Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

OrbitController.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file: OrbitController.h
00003 *  \brief: Orbit Element Controller for DSACSS.
00004 *  \author $Author: jayhawk_hokie $
00005 *  \version $Revision: 1.1 $
00006 *  \date    $Date: 2007/08/31 15:58:35 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /*! 
00009 */
00010 //////////////////////////////////////////////////////////////////////////////////////////////////
00011 
00012 #ifndef __ORBIT_CONTROLLER_H__
00013 #define __ORBIT_CONTROLLER_H__
00014 
00015 #include <stdlib.h>
00016 #include <unistd.h>
00017 #include <string.h>
00018 #include <stdio.h>
00019 #include <iostream.h>
00020 
00021 // Standard Includes
00022 #include <rotation/Rotation.h>
00023 #include <matrix/Matrix.h>
00024 
00025 // Orbit Includes
00026 #include <orbit/Orbit.h>
00027 #include <orbit/OrbitState.h>
00028 #include <orbit/orbitstaterep/Keplerian.h>
00029 
00030 #include <Base/Whorl.h>
00031 
00032 // transform coe
00033 #include <orbit/orbitstaterep/MappingMeanOsculatingOrbitElements.h>
00034 
00035 #include "Sensors/AshtechG12_GPS_PhysicalDevice.h"
00036 #include "Sensors/AccelerationClient.h"
00037 
00038 using namespace std;
00039 using namespace O_SESSAME;
00040 
00041 // this is not a good solution.... fix later
00042 // The number of satellites that Geode has been compiled for.
00043 static const int                        MASS            =100;    //  to be specified in main program (kg)
00044 
00045 class OrbitController 
00046 {
00047 
00048         public:
00049                 OrbitController( );
00050 
00051                 virtual ~OrbitController( );
00052 
00053                 // Facilitators
00054 
00055                         // Mutators
00056 
00057                                 /*! Runs the observer (pure virtual function) */
00058                                 virtual int Run() = 0;
00059 
00060                                 /*! Initializes the observer (pure virtual function */
00061                                 virtual int Initialize() = 0;
00062 
00063                 CAMdoubleMatrix DirectionCosMatrix1Axis( double _angle );
00064 
00065                 CAMdoubleMatrix DirectionCosMatrix2Axis( double _angle );
00066 
00067                 CAMdoubleMatrix DirectionCosMatrix3Axis( double _angle );
00068 
00069                 CAMdoubleVector WGS2ECEFPosition( double _latitude, double _longitude, double _altitude );
00070 
00071                 CAMdoubleVector NED2ECEFVelocity( double _latitude, double _longitude, double _altitude, 
00072                 double _velocityNorth, double _velocityEast, double _velocityDown );
00073 
00074                 CAMdoubleVector WGS842ECEF( double _latitude, double _longitude, double _altitude, 
00075                 double _velocityNorth, double _velocityEast, double _velocityDown );
00076 
00077                 CAMdoubleVector ECEFPosition2WGS84( double _x, double _y, double _z );
00078 
00079                 CAMdoubleVector ECEF2NEDVelocity( double _latitude, double _longitude, double _altitude, 
00080                 double _Vx, double _Vy, double _Vz );
00081 
00082                 CAMdoubleVector ECEF2WGS84( double _x, double _y, double _z, double _Vx, double _Vy, double _Vz );
00083 
00084                 CAMdoubleVector ECEF2ECI( CAMdoubleVector _ECEFVector, double _jDay );
00085 
00086                 CAMdoubleVector ECI2ECEF( CAMdoubleVector _ECIVector, double _jDay );
00087 
00088                 double lat_lon( double latlon, char sector );
00089 
00090                 void TangentPlaneState( AshtechG12_GPS_PhysicalDevice::Position recPos, CAMdoubleVector &_WGS84Vector );
00091 
00092 
00093                 Vector thruster(Vector udesired);
00094 
00095                 void cals(Vector ECI, Vector VECI, double a, double& H, double& p, double& b, double& r);
00096 
00097                 void ECI2COE(Vector ECI, Vector VECI, Keplerian& myCOE, double& a, double& e, double& i, double& Lon, double& Arg, double& tru); 
00098 
00099         protected:
00100 
00101                 /*! \brief Member object in Controller Class */
00102                 Whorl* m_whorl;
00103 
00104                 /* Space Vehicle Id */
00105                 int m_vehicleID ;
00106 
00107                 /* Acceleration Duration [s] */
00108                 double m_duration;
00109 
00110                 /* Space Vehicle Mass [kg] */
00111                 double m_mass;
00112 
00113                 /* Current Time */
00114                 ssfTime m_vehicleTime;
00115 
00116                 /* Reset delta V time history from orbit propagator */
00117                 AccelerationMessage * m_accelerationVector;
00118 
00119 };
00120 
00121 #endif
00122 
00123 // Do not change the comments below - they will be added automatically by CVS
00124 /*****************************************************************************
00125 *       $Log: OrbitController.h,v $
00126 *       Revision 1.1  2007/08/31 15:58:35  jayhawk_hokie
00127 *       Initial Submission.
00128 *
00129 *       
00130 *
00131 ******************************************************************************/
00132 

Generated on Wed Sep 5 12:54:23 2007 for DSACSS Operational Code by  doxygen 1.3.9.1