Earth Observation Mission CFI Software Lib Software User Manual |
00001 //-------------------------------------------------------- 00002 // Earth Observation Mission CFI Software. Version 4.26 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 void setAscii(const std::string& asciiTime, 00048 long reference = XLCFI_TIME_TAI, 00049 long timeFormat = XLCFI_ASCII_STD); 00050 00053 void setTransport(long transportTime[4], 00054 long reference = XLCFI_TIME_TAI, 00055 long timeFormat = XLCFI_TRANS_STD); 00056 00058 void setProcessing(double procTime, 00059 long reference = XLCFI_TIME_TAI, 00060 long timeFormat = XLCFI_PROC); 00061 00063 void setCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00064 const CucTimeConfig& config, 00065 long reference = XLCFI_TIME_TAI); // AN-673 00066 00068 void getAscii(std::string& asciiTime, 00069 long reference = XLCFI_TIME_TAI, 00070 long timeFormat = XLCFI_ASCII_STD) const; 00071 00074 void getTransport(long transportTime[4], 00075 long reference = XLCFI_TIME_TAI, 00076 long timeFormat = XLCFI_TRANS_STD) const; 00077 00079 Time getProcessing(long reference = XLCFI_TIME_TAI, 00080 long timeFormat = XLCFI_PROC) const; 00081 00083 void getCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00084 const CucTimeConfig& config, 00085 long reference = XLCFI_TIME_TAI) const; // AN-673 00086 00088 void change(long reference, 00089 long timeFormat = XLCFI_PROC); 00090 00092 void setBOM(); 00094 void setEOM(); 00095 00096 // Date arithmetic operators. 00098 Time operator+(const double d) const; 00100 Time operator-(const double d) const; 00102 double operator-(const Time& t) const; 00103 00104 // Time comparisons. 00106 bool operator>(const Time& t) const; 00108 bool operator<(const Time& t) const; 00110 bool operator>=(const Time& t) const; 00112 bool operator<=(const Time& t) const; 00114 bool operator==(const Time& t) const; 00116 bool operator!=(const Time& t) const; 00117 00118 protected: 00120 GenericId* getTimeId(); 00121 00122 private: 00123 TimeCorrelation timeId; 00124 int isBOM_EOM; 00125 }; 00126 00127 } // namespace EECFI 00128 00129 #endif