00001 ////////////////////////////////////////////////////////////////////////////////////////////////// 00002 /*!\file RungeKuttaFehlbergIntegrator.h 00003 * \brief Runge-Kutta-Fehlberg integrator. 00004 * \author $Author: jayhawk_hokie $ 00005 * \version $Revision: 1.2 $ 00006 * \date $Date: 2005/06/10 12:53:29 $ 00007 *////////////////////////////////////////////////////////////////////////////////////////////////// 00008 /* 00009 * \todo Add test cases 00010 */ 00011 ////////////////////////////////////////////////////////////////////////////////////////////////// 00012 00013 #ifndef __SSF_RUNGEKUTTAFEHLBERG_INTEGRATOR_H__ 00014 #define __SSF_RUNGEKUTTAFEHLBERG_INTEGRATOR_H__ 00015 00016 #include <matrix/Matrix.h> 00017 #include <utils/Integrator.h> 00018 namespace O_SESSAME { 00019 /*! \brief Runge-Kutta-Fehlberg integrator 00020 * \ingroup IntegrationLibrary 00021 * 00022 * \warning Implementation not complete! 00023 * \todo document algorithm 00024 */ 00025 class RungeKuttaFehlbergIntegrator : public Integrator 00026 { 00027 public: 00028 RungeKuttaFehlbergIntegrator(); 00029 00030 /*! Specific Orbit/Attitude simulation integration function 00031 * 00032 */ 00033 Matrix Integrate(const vector<ssfTime>& _propTime, odeFunctor _odeFunctorPtr, const Vector& _initialConditions, Orbit* _pOrbit, Attitude* _pAttitude, const Matrix& _constants, const Functor& _functorPtr); 00034 00035 /*! \brief Set the tolerance of the integration. 00036 * @param _numSteps number of steps to include between integration timesteps 00037 */ 00038 void SetTolerance(const double& _Tolerance) { m_Tolerance = _Tolerance; return; } 00039 00040 /*! \brief Return the tolerance of the integration 00041 * @return tolerance of the integration 00042 */ 00043 double GetTolerance() { return m_Tolerance; } 00044 00045 /*! \brief Set the minimum and maximum step-sizes. 00046 * @param _minStepSize minimum step-size between integration meshpoints. 00047 * @param _maxStepSize maximum step-size between integration meshpoints. 00048 */ 00049 void SetStepSizes(const double& _minStepSize, const double& _maxStepSize) { m_minStepSize = _minStepSize; m_maxStepSize = _maxStepSize; return; } 00050 00051 private: 00052 double m_Tolerance; /*!< Desired tolerance of the integration between timesteps */ 00053 double m_minStepSize; /*!< minimum step-size between integration calculation meshpoints */ 00054 double m_maxStepSize; /*!< maximum step-size between integration calculation meshpoints */ 00055 }; 00056 } // close namespace O_SESSAME 00057 00058 #endif 00059 // Do not change the comments below - they will be added automatically by CVS 00060 /***************************************************************************** 00061 * $Log: RungeKuttaFehlbergIntegrator.h,v $ 00062 * Revision 1.2 2005/06/10 12:53:29 jayhawk_hokie 00063 * Changed header file format to make it easier to link to the spacecraft code by only having to specify dsacss/dep/spacecraft/src (ex. "file.h" changed to <dir/file.h> where dir is a folder in src). 00064 * 00065 * Revision 1.1.1.1 2005/04/26 17:41:00 cakinli 00066 * Adding OpenSESSAME to DSACSS distrib to capture fixed version. 00067 * 00068 * Revision 1.5 2003/06/05 20:09:14 nilspace 00069 * Finished implementation and verified against a short 2 second integration. 00070 * 00071 * Revision 1.4 2003/05/22 02:59:15 nilspace 00072 * Updated comments. Changed to pass in pointers to Orbit & Attitude objects. 00073 * 00074 * Revision 1.3 2003/05/13 18:58:27 nilspace 00075 * Cleaned up comments. 00076 * 00077 * Revision 1.2 2003/04/25 13:45:55 nilspace 00078 * const'd Get() functions. 00079 * 00080 * Revision 1.1 2003/04/23 15:08:28 nilspace 00081 * Initial submission of RKF integrator. 00082 * 00083 * 00084 ******************************************************************************/