00001 00002 ////////////////////////////////////////////////////////////////////////////////////////////////// 00003 /*! \file WhorlHistory.h 00004 * \brief An abstract class to store Whorl data. 00005 * \author $Author: jayhawk_hokie $ 00006 * \version $Revision: 1.6 $ 00007 * \date $Date: 2007/05/31 17:38:48 $ 00008 *////////////////////////////////////////////////////////////////////////////////////////////////// 00009 /* 00010 */ 00011 ////////////////////////////////////////////////////////////////////////////////////////////////// 00012 00013 #ifndef __SSSL_WHORL_HISTORY_H__ 00014 #define __SSSL_WHORL_HISTORY_H__ 00015 00016 // System Includes 00017 #include <iostream> 00018 #include <fstream> 00019 #include <unistd.h> 00020 00021 // DSACSS Includes 00022 #include <utils/Time.h> 00023 00024 // XML Parser Include 00025 #include <dsacssinterface.h> 00026 00027 00028 using namespace std; 00029 using namespace O_SESSAME; 00030 00031 00032 /*! \brief Class for storing a time history of Simulator states. */ 00033 class WhorlHistory 00034 { 00035 public: 00036 WhorlHistory( TiXmlHandle _handle, string _WhorlName ); 00037 00038 virtual ~WhorlHistory( ); 00039 00040 int Initialize( ); 00041 00042 int Deinitialize( ); 00043 00044 int Parse( TiXmlHandle _handle, string _WhorlName ); 00045 00046 void AppendHistory( ssfTime _Time, Vector _AttitudeState, Vector _AttitudeControl ); 00047 00048 void AppendHistory( ssfTime _Time, Vector _AttitudeState, Vector _AttitudeControl, Vector _MRP ); 00049 00050 void AppendHistory( ssfTime _Time, Vector _AttitudeState, Vector _AttitudeControl, Vector _MRP, Vector _ReferenceAttitudeState, Vector _ReferenceMRP, Vector _ControlError ); 00051 00052 private: 00053 00054 /*! \brief Member ofstream in WheelHistory.h of data file to be saved */ 00055 ofstream *m_File; 00056 00057 /*! \brief Member string in WheelHistory.h, path of file */ 00058 string m_FilePath; 00059 00060 /*! \brief Member string in WheelHistory.h, identify specific test which is in file name. */ 00061 string m_TestID; 00062 00063 /*! \brief Member string in WheelHistory.h, identify file extension for data to be saved as. */ 00064 string m_FileExtension; 00065 00066 /*! \brief Member string in WheelHistory.h, the name of the object having data saved. */ 00067 string m_ObjectName; 00068 00069 /*! \brief Member string in WheelHistory.h, Name of file */ 00070 string m_FileName; 00071 }; 00072 00073 00074 #endif 00075 00076 00077 // Do not change the comments below - they will be added automatically by CVS 00078 /***************************************************************************** 00079 * $Log: WhorlHistory.h,v $ 00080 * Revision 1.6 2007/05/31 17:38:48 jayhawk_hokie 00081 * Added control error logging. 00082 * 00083 * Revision 1.5 2007/04/09 14:05:49 jayhawk_hokie 00084 * Changed data logging for Whorl. 00085 * 00086 * Revision 1.4 2005/03/16 18:08:14 cakinli 00087 * *** empty log message *** 00088 * 00089 * Revision 1.3 2003/11/01 21:00:16 rsharo 00090 * changed "Time.h" includes to "utils/Time.h" includes. Also eliminated excess compile warnings. 00091 * 00092 * Revision 1.2 2003/07/22 21:59:54 mavandyk 00093 * Fixed several bugs. Some functions have been commented out. 00094 * 00095 * Revision 1.1 2003/07/07 14:37:24 simpliciter 00096 * Initial submission. Should work once measurement issues are resolved. 00097 * 00098 * 00099 ******************************************************************************/