![]() |
Earth Observation Mission CFI Software Orbit Software User Manual |
![]() |
00001 //-------------------------------------------------------------------- 00002 // CVS Info: $Id: ANXTime.h,v 1.5 2009/03/30 08:51:41 expcfi Exp $ 00003 //-------------------------------------------------------------------- 00004 00005 #ifndef _ANXTIME_H 00006 #define _ANXTIME_H 00007 00008 //--INCLUDE----------------------------------------------------------- 00009 #include "OrbitData.h" 00010 #include "CfiError.h" 00011 #include "CfiClass.h" 00012 #include "OrbitId.h" 00013 00014 //--NAMESPACES-------------------------------------------------------- 00015 using namespace std; 00016 00017 namespace EECFI 00018 { 00019 00023 class ANXTime: public CfiClass 00024 { 00025 friend class RelANXTime; 00026 friend class OrbitExtra; 00027 friend class Swath; 00028 00029 public: 00030 long orbit; 00031 long seconds; 00032 long microseconds; 00033 00035 ANXTime(); 00036 00038 ANXTime( long orbitIn, long secondsIn, long microsecIn ); 00039 00041 ANXTime( const OrbitId &orbitId, long orbitIn, long secondsIn, long microsecIn ) throw (CfiError); 00042 00044 ANXTime( const ANXTime &at ); 00045 00047 ~ANXTime(); 00048 00050 double orbitToTime( long timeRef ) const throw (CfiError); 00051 00055 void timeToOrbit( long timeRef, double time ) throw (CfiError); 00056 00058 void setBOM(); 00059 00061 void setEOM(); 00062 00064 OrbitalInfo getOrbitInfo() const throw (CfiError); 00065 00067 void adjustWithNodalPeriod() throw (CfiError); 00068 00069 // ANXTime arithmetic operators. 00070 00072 ANXTime operator+ ( double time ); 00074 ANXTime operator- ( double time ); 00076 double operator- ( const ANXTime &t ) const throw (CfiError); 00077 00078 // ANXTime comparisons. 00080 bool operator> ( const ANXTime &t ) const throw (CfiError); 00082 bool operator< ( const ANXTime &t ) const throw (CfiError); 00084 bool operator>= ( const ANXTime &t ) const throw (CfiError); 00086 bool operator<= ( const ANXTime &t ) const throw (CfiError); 00088 bool operator== ( const ANXTime &t ) const throw (CfiError); 00090 bool operator!= ( const ANXTime &t ) const throw (CfiError); 00091 00093 void operator= ( const ANXTime &t ); 00094 00095 protected: 00096 00097 00098 private: 00099 OrbitId orbitId; 00100 int isBOM_EOM; 00101 }; 00102 00103 } // closing namespace 00104 00105 #endif