00001 ////////////////////////////////////////////////////////////////////////////////////////////////// 00002 /*! \file AttitudeObserver.h 00003 * \brief The attitude observer class inherits the functionality of the observer class and provides 00004 * the space for the the actual filter code for attitude and angular velocity. 00005 * \author $Author: cakinli $ 00006 * \version $Revision: 1.2 $ 00007 * \date $Date: 2005/03/16 18:08:15 $ 00008 *////////////////////////////////////////////////////////////////////////////////////////////////// 00009 /* 00010 */ 00011 ////////////////////////////////////////////////////////////////////////////////////////////////// 00012 00013 #ifndef __SSSL_ATTITUDE_OBSERVER_H__ 00014 #define __SSSL_ATTITUDE_OBSERVER_H__ 00015 00016 #include <Filtering/ExtendedKalmanFilter.h> 00017 #include <Observer/Observer.h> 00018 #include <Utils/Measurement.h> 00019 #include <Base/Whorl.h> 00020 #include <vector> 00021 #include <utils/RungeKutta.h> 00022 00023 using namespace std; 00024 using namespace O_SESSAME; 00025 00026 class AttitudeObserver : public Observer { 00027 00028 public: 00029 00030 /*! Constructor */ 00031 AttitudeObserver() { }; 00032 AttitudeObserver(Whorl* ptr_whorl) { 00033 m_whorl = ptr_whorl; 00034 int retcode = Initialize(); 00035 retcode = 0; 00036 }; 00037 00038 /*! Destructor */ 00039 ~AttitudeObserver() { }; 00040 00041 // Facilitators 00042 00043 // Mutators 00044 00045 /*! Initialize the filter */ 00046 int Initialize(); 00047 00048 /*! Run is the funtion that implements the estimator in the derived class Filter */ 00049 int Run(); 00050 00051 protected: 00052 00053 private: 00054 00055 Vector m_b; 00056 ExtendedKalmanFilter ekf; 00057 Whorl* m_whorl; 00058 Measurement m_measurements[3]; 00059 00060 }; 00061 00062 #endif 00063 00064 // Do not change the comments below - they will be added automatically by CVS 00065 /***************************************************************************** 00066 * $Log: AttitudeObserver.h,v $ 00067 * Revision 1.2 2005/03/16 18:08:15 cakinli 00068 * *** empty log message *** 00069 * 00070 * Revision 1.1 2003/08/18 19:38:15 mavandyk 00071 * *** empty log message *** 00072 * 00073 * Revision 1.8 2003/08/13 23:18:22 mavandyk 00074 * Altered structure as outline in meeting. 00075 * 00076 * Revision 1.7 2003/08/06 21:49:27 mavandyk 00077 * Added comments fixed class structure and runs with config parsig. 00078 * 00079 * Revision 1.6 2003/08/01 11:21:52 mavandyk 00080 * Changed class structure. 00081 * 00082 * Revision 1.5 2003/07/21 21:53:59 mavandyk 00083 * Fixed some syntax errors. 00084 * 00085 * Revision 1.4 2003/07/14 20:06:41 mavandyk 00086 * Fixed calls to Whorl class, and handling of time and measurements. 00087 * 00088 * Revision 1.3 2003/07/10 19:50:53 mavandyk 00089 * Fixed time handling. 00090 * 00091 * Revision 1.1 2003/07/04 14:12:29 simpliciter 00092 * Moved from src directory. 00093 * 00094 * Revision 1.1 2003/07/02 21:33:08 mavandyk 00095 * The observer for the demo. 00096 * 00097 * Revision 1.1 2003/06/30 16:06:00 nicmcp 00098 * replaced the controller files with the Controller files 00099 * 00100 * Revision 1.3 2003/06/30 15:51:57 nicmcp 00101 * made some changes to the controller files 00102 * 00103 * Revision 1.2 2003/06/30 14:13:35 simpliciter 00104 * Modified comments, added log blocks. 00105 * 00106 * 00107 * 00108 ******************************************************************************/