Earth Observation Mission CFI Software Lib Software User Manual |
00001 //-------------------------------------------------------- 00002 // Earth Observation Mission CFI Software. Version 4.22 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 //--INCLUDE----------------------------------------------------------- 00013 #include <CfiClass.h> 00014 #include <LibData.h> 00015 #include <TimeCorrelation.h> 00016 00017 //--NAMESPACES-------------------------------------------------------- 00018 00019 namespace EECFI 00020 { 00024 class XL_DECL Time : public CfiClass 00025 { 00026 // Friend classes 00027 friend class StateVector; 00028 friend class StarData; 00029 00030 public: 00031 double time; 00032 long ref; 00033 long format; 00034 00036 explicit Time(double value = 0, 00037 long reference = XLCFI_TIME_TAI, 00038 long timeFormat = XLCFI_PROC); 00039 00041 explicit Time(const TimeCorrelation& timeCorr, 00042 double value = 0, 00043 long reference = XLCFI_TIME_TAI, 00044 long timeFormat = XLCFI_PROC); 00045 00047 ~Time() NOEXCEPT{}; 00048 00050 void setAscii(const std::string& asciiTime, 00051 long reference = XLCFI_TIME_TAI, 00052 long timeFormat = XLCFI_ASCII_STD); 00053 00056 void setTransport(long transportTime[4], 00057 long reference = XLCFI_TIME_TAI, 00058 long timeFormat = XLCFI_TRANS_STD); 00059 00061 void setProcessing(double procTime, 00062 long reference = XLCFI_TIME_TAI, 00063 long timeFormat = XLCFI_PROC); 00064 00066 void setCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00067 const CucTimeConfig& config, 00068 long reference = XLCFI_TIME_TAI); // AN-673 00069 00071 void getAscii(std::string& asciiTime, 00072 long reference = XLCFI_TIME_TAI, 00073 long timeFormat = XLCFI_ASCII_STD) const; 00074 00077 void getTransport(long transportTime[4], 00078 long reference = XLCFI_TIME_TAI, 00079 long timeFormat = XLCFI_TRANS_STD) const; 00080 00082 Time getProcessing(long reference = XLCFI_TIME_TAI, 00083 long timeFormat = XLCFI_PROC) const; 00084 00086 void getCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00087 const CucTimeConfig& config, 00088 long reference = XLCFI_TIME_TAI) const; // AN-673 00089 00091 void change(long reference, 00092 long timeFormat = XLCFI_PROC); 00093 00095 void setBOM(); 00097 void setEOM(); 00098 00099 // Date arithmetic operators. 00101 Time operator+(const double d) const; 00103 Time operator-(const double d) const; 00105 double operator-(const Time& t) const; 00106 00107 // Time comparisons. 00109 bool operator>(const Time& t) const; 00111 bool operator<(const Time& t) const; 00113 bool operator>=(const Time& t) const; 00115 bool operator<=(const Time& t) const; 00117 bool operator==(const Time& t) const; 00119 bool operator!=(const Time& t) const; 00120 00121 protected: 00123 GenericId* getTimeId(); 00124 00125 private: 00126 TimeCorrelation timeId; 00127 int isBOM_EOM; 00128 }; 00129 00130 } // namespace EECFI 00131 00132 #endif