Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

Acceleration.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002-2004, Bernd Speiser */
00006 /* This file is part of Quantities.
00007 
00008 PhysicalQuantities is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 PhysicalQuantities is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017   
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021 02111-1307, USA.
00022 */
00023 
00024 #ifndef _Acceleration_h
00025 #define _Acceleration_h
00026 
00027 #include "Quantity/Variable.h"
00028 #include "Quantity/Constant.h"
00029 #include "Quantity/QuantityCluster.h"
00030 
00031 #include "PhysicalQuantities/Length.h"
00032 #include "PhysicalQuantities/Time.h"
00033 
00034 namespace Quantities {
00035 
00037 typedef BSUtilities::Rational<1> Acceleration_LE;
00039 typedef BSUtilities::Rational<0> Acceleration_M; 
00041 typedef BSUtilities::Rational<-2> Acceleration_TI;
00043 typedef BSUtilities::Rational<0> Acceleration_E;
00045 typedef BSUtilities::Rational<0> Acceleration_TE;
00047 typedef BSUtilities::Rational<0> Acceleration_A;
00049 typedef BSUtilities::Rational<0> Acceleration_LU;
00050 
00052 class AccelerationGroup
00053   {
00055     public:
00056       typedef TYPELIST_7(Acceleration_LE, Acceleration_M, 
00057                          Acceleration_TI, Acceleration_E,
00058                          Acceleration_TE, Acceleration_A, 
00059                                                  Acceleration_LU) DimTL;
00060   };
00061 
00063   namespace AccelerationUnits {
00064 
00066 typedef Units::Unit<AccelerationGroup> AccelerationUnit;
00067 
00069 class GalUnit;
00071 class StandardAccelerationOfFreeFallUnit;
00072 
00073 
00074 /* the MetrePerSquareSecond and prefixed variants */
00075 
00076 typedef TYPELIST_3(LengthUnits::Metre, LengthUnits::CentiMetre,
00077                                   LengthUnits::MilliMetre) LengthList;
00078 //typedef LengthUnits::LengthUnits LengthList;
00079 
00081 typedef Units::CompoundElement<AccelerationGroup, LengthList, 
00082                                BSUtilities::Rational<1> > LengthElement;
00083 
00084 typedef TYPELIST_3(TimeUnits::Second, TimeUnits::MilliSecond, 
00085                                        TimeUnits::MicroSecond) TimeList;
00086 //typedef TimeUnits::TimeUnits TimeList;
00087 
00089 typedef Units::CompoundElement<AccelerationGroup, TimeList, 
00090                                 BSUtilities::Rational<-2> > TimeElement;
00091 
00092 typedef TYPELIST_2(LengthElement, TimeElement) 
00093                                               AccelerationCompoundList;
00094 typedef Units::Compound<AccelerationGroup, AccelerationCompoundList> 
00095                                              AccelerationCompoundUnits;
00096 
00097 typedef Units::Composed<AccelerationCompoundUnits, 
00098   TYPELIST_2(LengthUnits::Metre, TimeUnits::Second)> 
00099                                                    MetrePerSquareSecond;
00100 typedef Units::Composed<AccelerationCompoundUnits, 
00101   TYPELIST_2(LengthUnits::CentiMetre, TimeUnits::Second)> 
00102                                               CentiMetrePerSquareSecond;
00103 typedef Units::Composed<AccelerationCompoundUnits, 
00104   TYPELIST_2(LengthUnits::Metre, TimeUnits::MilliSecond)> 
00105                                               MetrePerSquareMilliSecond;
00106 
00107 /* declaration of other Acceleration units */
00108 /* the Gal */
00109 
00110 typedef Units::NonPrefixable<AccelerationGroup, GalUnit> Gal;
00111 
00112 /* the acceleration of free fall */
00113 
00114 typedef Units::NonPrefixable<AccelerationGroup, 
00115      StandardAccelerationOfFreeFallUnit> StandardAccelerationOfFreeFall;
00116 
00118 typedef TYPELIST_5(MetrePerSquareSecond, CentiMetrePerSquareSecond, 
00119                    MetrePerSquareMilliSecond, Gal, 
00120                       StandardAccelerationOfFreeFall) AccelerationUnits;
00121 
00122   }
00123 
00124 /* declaration of Acceleration dimension */
00125 
00126 typedef Dimensions::Dimension<AccelerationGroup> AccelerationDimension;
00127 
00128 /* Acceleration quantity */
00129 
00130 typedef Quantity<AccelerationGroup, 
00131   AccelerationUnits::AccelerationUnits,
00132         AccelerationUnits::MetrePerSquareSecond> AccelerationQuantities;
00133 
00135 typedef Variable<AccelerationQuantities> Acceleration;
00137 typedef Constant<AccelerationQuantities> AccelerationConstant;
00138 
00139 typedef VariableVector<AccelerationQuantities> AccelerationVector;
00140 
00141 }
00142 
00143 #endif /* _Acceleration_h */

Generated on Sun Jan 15 13:58:03 2006 for PhysicalQuantities by doxygen 1.3.6