![]() |
Earth Observation Mission CFI Software Lib Software User Manual |
![]() |
00001 //-------------------------------------------------------- 00002 // Earth Observation Mission CFI Software. Version 4.18 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 00020 namespace EECFI 00021 { 00022 00026 class XL_DECL Time: public CfiClass 00027 { 00028 // Friend classes 00029 friend class StateVector; 00030 friend class StarData; 00031 00032 public: 00033 00034 double time; 00035 long ref; 00036 long format; 00037 00039 explicit Time(double value = 0, 00040 long reference = XLCFI_TIME_TAI, 00041 long timeFormat = XLCFI_PROC); 00042 00044 explicit Time(const TimeCorrelation &timeCorr, 00045 double value = 0, 00046 long reference = XLCFI_TIME_TAI, 00047 long timeFormat = XLCFI_PROC); 00048 00050 ~Time() NOEXCEPT {}; 00051 00053 void setAscii(const std::string &asciiTime, 00054 long reference = XLCFI_TIME_TAI, 00055 long timeFormat = XLCFI_ASCII_STD) ; 00056 00059 void setTransport(long transportTime[4], 00060 long reference = XLCFI_TIME_TAI, 00061 long timeFormat = XLCFI_TRANS_STD) ; 00062 00064 void setProcessing(double procTime, 00065 long reference = XLCFI_TIME_TAI, 00066 long timeFormat = XLCFI_PROC); 00067 00069 void setCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00070 const CucTimeConfig &config, 00071 long reference = XLCFI_TIME_TAI) ; // AN-673 00072 00074 void getAscii(std::string &asciiTime, 00075 long reference = XLCFI_TIME_TAI, 00076 long timeFormat = XLCFI_ASCII_STD) const; 00077 00080 void getTransport(long transportTime[4], 00081 long reference = XLCFI_TIME_TAI, 00082 long timeFormat = XLCFI_TRANS_STD) const; 00083 00085 Time getProcessing(long reference = XLCFI_TIME_TAI, 00086 long timeFormat = XLCFI_PROC) const; 00087 00089 void getCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00090 const CucTimeConfig &config, 00091 long reference = XLCFI_TIME_TAI ) const; // AN-673 00092 00094 void change(long reference, 00095 long timeFormat = XLCFI_PROC) ; 00096 00098 void setBOM(); 00100 void setEOM(); 00101 00102 // Date arithmetic operators. 00104 Time operator+(const double d) const; 00106 Time operator-(const double d) const; 00108 double operator-(const Time &t) const ; 00109 00110 // Time comparisons. 00112 bool operator>( const Time &t) const ; 00114 bool operator<( const Time &t) const ; 00116 bool operator>=(const Time &t) const ; 00118 bool operator<=(const Time &t) const ; 00120 bool operator==(const Time &t) const ; 00122 bool operator!=(const Time &t) const ; 00123 00124 00125 protected: 00126 00128 GenericId* getTimeId(); 00129 00130 private: 00131 00132 TimeCorrelation timeId; 00133 int isBOM_EOM; 00134 00135 }; 00136 00137 } // closing namespace 00138 00139 #endif