00001 00002 00008 00012 00013 00014 #ifndef __ATTITUDE_H__ 00015 #define __ATTITUDE_H__ 00016 00017 #include "Rotation.h" 00018 #include "Integrator.h" 00019 #include "Propagator.h" 00020 #include "AttitudeHistory.h" 00021 #include "AttitudeState.h" 00022 namespace O_SESSAME { 00023 class Propagator; // forward declaration 00024 00032 typedef void (*IntegratedAttitudeStateConversionFunction)(const Matrix &_meshPoint, AttitudeState &_convertedAttitudeState); 00033 00035 00051 class Attitude 00052 { 00053 public: 00055 Attitude(); 00057 virtual ~Attitude(); 00058 00059 public: 00060 void SetStateObject(const AttitudeState &_newAttitudeState); 00061 AttitudeState GetStateObject() const; 00062 00063 private: 00064 AttitudeState m_AttitudeState; 00065 00066 // ***************************** 00067 // ********** TORQUES ********** 00068 // ***************************** 00069 public: 00073 void SetControlTorques(const Vector &_ControlTorques); 00074 00078 Vector GetControlTorques() const; 00079 00080 00084 Vector GetTorques() const; 00085 private: 00087 Vector m_ControlTorques; 00088 00089 // ***************************** 00090 // ******** PROPAGATION ******** 00091 // ***************************** 00092 public: 00097 void SetDynamicsEq(odeFunctor _AttDynEqFuncPtr); 00098 00102 odeFunctor GetDynamicsEq() const; 00103 00104 00108 void SetStateConversion(IntegratedAttitudeStateConversionFunction _ConversionFunction); 00109 00113 IntegratedAttitudeStateConversionFunction GetStateConversion() const; 00114 00119 Matrix Propagate(const vector<ssfTime> &_time); 00120 00125 void SetPropagator(Propagator *_pPropagator); 00126 00131 bool IsIntegrateable(); 00132 private: 00134 odeFunctor m_AttDynEqFuncPtr; 00135 00137 IntegratedAttitudeStateConversionFunction m_AttitudeStateConversionFunction; 00138 00140 Propagator *m_pPropagator; 00141 00143 bool m_Integrateable; 00144 00145 // ***************************** 00146 // ********* Physical ********** 00147 // ***************************** 00148 public: 00149 void SetParameters(const Matrix &_Parameters); 00150 Matrix GetParameters() const; 00151 00152 private: 00153 Matrix m_Parameters; 00154 00155 // ***************************** 00156 // ******** ENVIRONMENT ******** 00157 // ***************************** 00158 public: 00166 void SetEnvironment(Environment* _pNewEnvironment); 00175 Environment* GetEnvironment() const; 00176 00184 ObjectFunctor<Environment> GetEnvironmentForcesFunctor(); 00185 private: 00187 Environment *m_pEnvironment; 00189 ObjectFunctor<Environment> m_EnvironmentForcesFunctor; 00190 // ************************* 00191 // ******** HISTORY ******** 00192 // ************************* 00193 public: 00199 AttitudeHistory& GetHistoryObject(); 00200 00201 private: 00203 AttitudeHistory m_AttitudeHistory; 00204 00205 00206 }; 00207 } // close namespace O_SESSAME 00208 #endif 00209 /*!*************************************************************************** 00210 * $Log: Attitude.h,v $ 00211 * Revision 1.10 2003/06/10 14:51:42 nilspace 00212 * Changed GetHistory to GetHistoryObject 00213 * 00214 * Revision 1.9 2003/05/20 17:46:25 nilspace 00215 * Updated comments. 00216 * 00217 * Revision 1.8 2003/05/13 18:50:47 nilspace 00218 * Fixed comments. 00219 * 00220 * Revision 1.7 2003/04/28 20:12:45 nilspace 00221 * GetHistory return by reference. 00222 * 00223 * Revision 1.6 2003/04/27 22:11:51 nilspace 00224 * Moved all of the function definitions out of the class interface definition. 00225 * 00226 * Revision 1.5 2003/04/27 22:04:31 nilspace 00227 * Created the namespace O_SESSAME. 00228 * 00229 * Revision 1.4 2003/04/25 13:44:58 nilspace 00230 * Updated to work with current History, Environment & Propagator objects. 00231 * 00232 * Revision 1.3 2003/04/23 21:54:33 nilspace 00233 * Updated to work with AttitudeState, Environment. 00234 * Removed the setting and getting of AngVel, AngAccel, Rotation. 00235 * 00236 * Revision 1.4 2003/03/27 20:25:17 nilspace 00237 * Implemented calling the propagator & history objects. 00238 * 00239 * Revision 1.3 2003/03/27 02:48:54 nilspace 00240 * Added the Propagator object functionality. Documented some of the new functions.Fixed history storage. 00241 * 00242 * Revision 1.2 2003/03/25 19:43:37 nilspace 00243 * fixed to pre-ruined state. 00244 * Changed enum to be auto number defining. 00245 * 00246 * Revision 1.1 2003/03/25 02:41:05 nilspace 00247 * initial Submission. Attitude.h may not be current due to lost copy from ProjectBuilder crash. 00248 * 00249 * Revision 1.1 2003/02/27 18:37:26 nilspace 00250 * Initial submission of Attitude class implementation. 00251 * 00252 * 00253 ******************************************************************************/