Earth Observation Mission CFI Software Lib Software User Manual |
00001 //-------------------------------------------------------- 00002 // Earth Observation Mission CFI Software. Version 4.10 00003 //-------------------------------------------------------- 00004 00005 //-------------------------------------------------------------------- 00006 // CVS Info: $Id: EETime.h,v 1.10 2014-02-20 20:02:28 cavm Exp $ 00007 //-------------------------------------------------------------------- 00008 00009 #ifndef _EECFI_TIME_H 00010 #define _EECFI_TIME_H 00011 00012 00013 //--INCLUDE----------------------------------------------------------- 00014 #include "LibData.h" 00015 #include "CfiClass.h" 00016 #include "TimeCorrelation.h" 00017 00018 //--NAMESPACES-------------------------------------------------------- 00019 using namespace std; 00020 00021 namespace EECFI 00022 { 00023 00027 class Time: public CfiClass 00028 { 00029 // Friend classes 00030 friend class StateVector; 00031 friend class StarData; 00032 00033 public: 00034 00035 double time; 00036 long ref; 00037 long format; 00038 00040 Time(double value = 0, 00041 long reference = XLCFI_TIME_TAI, 00042 long timeFormat = XLCFI_PROC); 00043 00045 Time(TimeCorrelation timeCorr, 00046 double value = 0, 00047 long reference = XLCFI_TIME_TAI, 00048 long timeFormat = XLCFI_PROC); 00049 00051 ~Time() {}; 00052 00054 void setAscii(string asciiTime, 00055 long reference = XLCFI_TIME_TAI, 00056 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00057 00060 void setTransport(long transportTime[4], 00061 long reference = XLCFI_TIME_TAI, 00062 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00063 00065 void setProcessing(double procTime, 00066 long reference = XLCFI_TIME_TAI, 00067 long timeFormat = XLCFI_PROC); 00068 00070 void getAscii(string &asciiTime, 00071 long reference = XLCFI_TIME_TAI, 00072 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00073 00076 void getTransport(long transportTime[4], 00077 long reference = XLCFI_TIME_TAI, 00078 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00079 00081 Time getProcessing(long reference = XLCFI_TIME_TAI, 00082 long timeFormat = XLCFI_PROC) throw (CfiError); 00083 00085 void change(long reference, 00086 long timeFormat = XLCFI_PROC) throw (CfiError); 00087 00089 void setBOM(); 00091 void setEOM(); 00092 00093 // Date arithmetic operators. 00095 Time operator+(const double d) const; 00097 Time operator-(const double d) const; 00099 double operator-(const Time &t) const throw (CfiError); 00100 00101 // Time comparisons. 00103 bool operator>( const Time &t) const throw (CfiError); 00105 bool operator<( const Time &t) const throw (CfiError); 00107 bool operator>=(const Time &t) const throw (CfiError); 00109 bool operator<=(const Time &t) const throw (CfiError); 00111 bool operator==(const Time &t) const throw (CfiError); 00113 bool operator!=(const Time &t) const throw (CfiError); 00114 00115 00116 protected: 00117 00119 GenericId* getTimeId(); 00120 00121 private: 00122 00123 TimeCorrelation timeId; 00124 int isBOM_EOM; 00125 00126 }; 00127 00128 } // closing namespace 00129 00130 #endif