00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _PlaneAngle_h
00025 #define _PlaneAngle_h
00026
00027
00028 #include "Quantities/Quantity/Variable.h"
00029 #include "Quantities/Quantity/Constant.h"
00030 #include "Quantities/Quantity/QuantityAggregates.h"
00031
00032 namespace quantity {
00033 namespace planeAngle {
00034
00036 class Class;
00037
00039 class Unit;
00040
00041
00042 class RadianUnits;
00043 class DegreeUnit;
00044 class MinuteUnit;
00045 class SecondUnit;
00046 class GradeUnit;
00047
00049 typedef unit::Prefixable<Unit, RadianUnits> Radians;
00050
00052 typedef unit::Prefixed<Radians> Radian;
00053 typedef unit::Prefixed<Radians, unit::Deci> DeciRadian;
00054 typedef unit::Prefixed<Radians, unit::Milli> MilliRadian;
00055 typedef unit::Prefixed<Radians, unit::Micro> MicroRadian;
00056 typedef unit::Prefixed<Radians, unit::Nano> NanoRadian;
00057 typedef unit::Prefixed<Radians, unit::Pico> PicoRadian;
00058
00060 typedef unit::NonPrefixable<Unit, DegreeUnit> Degree;
00061
00063 typedef unit::NonPrefixable<Unit, MinuteUnit> Minute;
00064
00066 typedef unit::NonPrefixable<Unit, SecondUnit> Second;
00067
00069 typedef unit::NonPrefixable<Unit, GradeUnit> Grade;
00070
00072 typedef Loki::Typelist<Radians, Loki::Typelist<Degree, Loki::Typelist<Minute,
00073 Loki::Typelist<Second, Loki::Typelist<Grade, Loki::NullType> > > > > Units;
00074
00075
00076 typedef quantity::Quantity<Class> Quantity;
00077 typedef quantity::Quantity<Class, int> IntQuantity;
00078
00079 class DerivedPlaneAngle;
00080
00081 }
00082
00084 template<>
00085 struct QuantityTraits<planeAngle::Class>
00086 {
00087 typedef
00088 dimension::Dimension<BSUtilities::Rational<0>,
00089 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00090 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00091 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00092 typedef planeAngle::Unit UnitType;
00093 typedef planeAngle::Units UnitList;
00094 typedef planeAngle::Radian DefaultUnit;
00095
00096 typedef planeAngle::DerivedPlaneAngle DefaultDerivedQuantityType;
00097
00098 static const std::string NameString ();
00099 static const std::string SymbolString ();
00100
00101 };
00102
00103
00104 template<>
00105 struct DerivedQuantityTraits<planeAngle::Class, planeAngle::DerivedPlaneAngle>
00106 {
00107 static const bool OverwriteName = false;
00108 static const bool OverwriteSymbol = false;
00109
00110 static const std::string NameString ();
00111 static const std::string SymbolString ();
00112
00113 };
00114
00116
00120 #define PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(helper) template<class ST> struct helper<planeAngle::Class, ST> {static ST exec (const Quantity<planeAngle::Class, ST> &quantity) {return ST(std::sin (unit::Reverse<planeAngle::Radian>::VAL (quantity.standard_value ())));}};
00121
00122 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(sinHelper)
00123 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(cosHelper)
00124 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(tanHelper)
00125 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(sinhHelper)
00126 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(coshHelper)
00127 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(tanhHelper)
00128 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(asinHelper)
00129 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(acosHelper)
00130 PHYSICALQUANTITIES_PLANEANGLE_TRIGONOMETRY_HELPER(atanHelper)
00131
00133 typedef Variable<planeAngle::Quantity> PlaneAngle;
00134
00136 typedef Variable<planeAngle::IntQuantity> IntPlaneAngle;
00137
00139 typedef Variable<planeAngle::Quantity> DegreePlaneAngle;
00140
00142 typedef Constant<planeAngle::Quantity> PlaneAngleConstant;
00143
00145 typedef VariableVector<QuantityVector<planeAngle::Class> > PlaneAngleVector;
00146
00147 }
00148
00149 #endif