SimpleAerodynamicDisturbances.h

Go to the documentation of this file.
00001 
00002 
00008 /* 
00009 */
00011 
00012 #ifndef __OSESSAME_SIMPLE_ATMOSPHERE_DISTURBANCES_H__
00013 #define __OSESSAME_SIMPLE_ATMOSPHERE_DISTURBANCES_H__
00014 #include "matrix/Matrix.h"
00015 #include "Time.h"
00016 #include "OrbitState.h"
00017 #include "Attitude.h"
00018 #include "Environment.h"
00019 #include <vector.h>
00020 using namespace std;
00021 using namespace O_SESSAME;
00022 
00034 inline Vector SimpleAerodynamicDragForce(const ssfTime &_currentTime, const OrbitState &_currentOrbitState, const AttitudeState &_currentAttitudeState, const EnvFuncParamaterType &_parameterList)
00035 {
00036     static Vector Forces(3);
00037     double BC = *(reinterpret_cast<double*>(_parameterList[0]));
00038     static Vector Vrel(3); Vrel(_) = _currentOrbitState.GetState()(_(VectorIndexBase+3,VectorIndexBase+5));
00039     double Vrel_mag = norm2(Vrel);
00040     double rho = *(reinterpret_cast<double*>(_parameterList[1]));
00041     Forces = -1/2 * rho / BC * pow(Vrel_mag,2) * Vrel / Vrel_mag; 
00042     return Forces;
00043 }
00044 #endif
00045 // Do not change the comments below - they will be added automatically by CVS
00046 /*****************************************************************************
00047 *       $Log: GravityFunctions.h,v $
00048 *
00049 ******************************************************************************/

Generated on Wed Aug 6 12:58:52 2003 for Open-Sessame Framework by doxygen1.3