| Earth Observation Mission CFI Software Orbit Software User Manual |

Public Member Functions | Public Attributes

# EECFI::ANXTime Class Reference

This class contains a time instant given as an absolute orbit number plus the time elapsed since the ANX. More...

Inheritance diagram for EECFI::ANXTime:

List of all members.

## Public Member Functions
| ANXTime ()
| Class constructor.
| ANXTime (long orbitIn, long secondsIn, long microsecIn)
| Class constructor with AXN time.
| ANXTime (const OrbitId &orbitId, long orbitIn, long secondsIn, long microsecIn) throw (CfiError)
| Class constructor with ANX time and Orbit id.
| ANXTime (const ANXTime &at)
| Copy constructor.
| ~ANXTime ()
| Class destructor.
double | orbitToTime (long timeRef) const throw (CfiError)
| Compute the time for a given orbit and time after the ANX.
void | timeToOrbit (long timeRef, double time) throw (CfiError)
| Get the absolute orbit number and the time after the ANX for a given time.
void | setBOM ()
| Set time to Beggining of mission (BOM).
void | setEOM ()
| Set time to End of mission (EOM).
OrbitalInfo | getOrbitInfo () const throw (CfiError)
| Returns orbital information for the orbit of the object.
void | adjustWithNodalPeriod () throw (CfiError)
| Correct ANX time taking into account the orbit duration.
ANXTime | operator+ (double time)
| Operator + (add a time).
ANXTime | operator- (double time)
| Operator - (subtract a time).
double | operator- (const ANXTime &t) const throw (CfiError)
| Substract two ANXTime objects and returns the number of seconds between them.
bool | operator> (const ANXTime &t) const throw (CfiError)
| Operator > .
bool | operator< (const ANXTime &t) const throw (CfiError)
| Operator < .
bool | operator>= (const ANXTime &t) const throw (CfiError)
| Operator >= .
bool | operator<= (const ANXTime &t) const throw (CfiError)
| Operator <= .
bool | operator== (const ANXTime &t) const throw (CfiError)
| Operator ==.
bool | operator!= (const ANXTime &t) const throw (CfiError)
| Operator != .
void | operator= (const ANXTime &t)
| Assigment operator.
## Public Attributes
long | orbit
| Absolute orbit number.
long | seconds
| Seconds since the ANX.
long | microseconds
| Microseconds.

## Detailed Description

This class contains a time instant given as an absolute orbit number plus the time elapsed since the ANX.

## Constructor & Destructor Documentation

EECFI::ANXTime::ANXTime | ( |  | ) |

Class constructor.

EECFI::ANXTime::ANXTime | ( | long | orbitIn,
|  | long | secondsIn,
|  | long | microsecIn |
| ) |  |  |

Class constructor with AXN time.

References microseconds, orbit, and seconds.

EECFI::ANXTime::ANXTime | ( | const OrbitId & | orbitId,
|  | long | orbitIn,
|  | long | secondsIn,
|  | long | microsecIn |
| ) |  |  | throw (CfiError)

Class constructor with ANX time and Orbit id.

EECFI::ANXTime::ANXTime | ( | const ANXTime & | at | ) |

Copy constructor.

Parameters:

  | at | ANXTime object to copy.

References microseconds, orbit, and seconds.

EECFI::ANXTime::~ANXTime | ( |  | ) |

Class destructor.

## Member Function Documentation

void EECFI::ANXTime::adjustWithNodalPeriod | ( |  | ) | throw (CfiError)

Correct ANX time taking into account the orbit duration.

References EECFI::CfiError::addMsg(), getOrbitInfo(), microseconds, EECFI::OrbitalInfo::nodalPeriod, orbit, and seconds.

Referenced by operator-(), operator<(), operator==(), and operator>().

OrbitalInfo EECFI::ANXTime::getOrbitInfo | ( |  | ) | const throw (CfiError)

Returns orbital information for the orbit of the object.

Returns:
  Information of orbit in ANXTime object.

References EECFI::OrbitalInfo::absOrbit, EECFI::CfiError::addMsg(), EECFI::OrbitalInfo::cycLength, EECFI::OrbitalInfo::meanKep, EECFI::OrbitalInfo::mlst, EECFI::OrbitalInfo::mlstDrift, EECFI::OrbitalInfo::nodalPeriod, orbit, EECFI::OrbitalInfo::oscKep, EECFI::OrbitalInfo::phasing, EECFI::OrbitalInfo::posAnx, EECFI::OrbitalInfo::repCycle, EECFI::CfiClass::throwWarn, EECFI::OrbitalInfo::utcAnx, and EECFI::OrbitalInfo::velAnx.

Referenced by adjustWithNodalPeriod(), and operator-().

bool EECFI::ANXTime::operator!= | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator != .

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg().

ANXTime EECFI::ANXTime::operator+ | ( | double | time | ) |

Operator + (add a time).

Parameters:

  | time | Seconds to be added to the ANXTime object.

Returns:
  Resulting ANX time.

References microseconds, and seconds.

ANXTime EECFI::ANXTime::operator- | ( | double | time | ) |

Operator - (subtract a time).

Parameters:

  | time | Seconds to be substracted from the ANXTime object.

Returns:
  Resulting ANX time.

References microseconds, and seconds.

double EECFI::ANXTime::operator- | ( | const ANXTime & | at | ) | const throw (CfiError)

Substract two ANXTime objects and returns the number of seconds between them.

Parameters:

  | at | ANXTime object we want to substract to the object.

Returns:
  Time difference in seconds.

References EECFI::CfiError::addMsg(), adjustWithNodalPeriod(), getOrbitInfo(), microseconds, EECFI::OrbitalInfo::nodalPeriod, orbit, and seconds.

bool EECFI::ANXTime::operator< | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator < .

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg(), adjustWithNodalPeriod(), microseconds, orbit, and seconds.

bool EECFI::ANXTime::operator<= | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator <= .

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg().

void EECFI::ANXTime::operator= | ( | const ANXTime & | t | ) |

Assigment operator.

Parameters:

  | t | ANXTime object we want to copy values into this one.

Returns:
  Result of comparison.

References microseconds, orbit, and seconds.

bool EECFI::ANXTime::operator== | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator ==.

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg(), adjustWithNodalPeriod(), microseconds, orbit, and seconds.

bool EECFI::ANXTime::operator> | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator > .

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg(), adjustWithNodalPeriod(), microseconds, orbit, and seconds.

bool EECFI::ANXTime::operator>= | ( | const ANXTime & | at | ) | const throw (CfiError)

Operator >= .

Parameters:

  | at | ANXTime object we want to compare with.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg().

double EECFI::ANXTime::orbitToTime | ( | long | timeRef | ) | const throw (CfiError)

Compute the time for a given orbit and time after the ANX.

Parameters:

  | timeRef | Time reference (TimeRefOrbitEnum).

Returns:
  Time (decimal days, processing format).

References EECFI::CfiError::addMsg().

void EECFI::ANXTime::setBOM | ( |  | ) |

Set time to Beggining of mission (BOM).

void EECFI::ANXTime::setEOM | ( |  | ) |

Set time to End of mission (EOM).

void EECFI::ANXTime::timeToOrbit | ( | long | timeRef,
|  | double | time |
| ) |  |  | throw (CfiError)

Get the absolute orbit number and the time after the ANX for a given time.

Results are stored in the object.

Parameters:

  | timeRef | Time reference (TimeRefOrbitEnum).
  | time | Time (decimal days, processing format).

References EECFI::CfiError::addMsg().

## Member Data Documentation

long EECFI::ANXTime::microseconds

Microseconds.

Referenced by adjustWithNodalPeriod(), ANXTime(), operator+(), operator-(), operator<(), operator=(), operator==(), operator>(), and EECFI::RelANXTime::toAbsolute().

long EECFI::ANXTime::orbit

Absolute orbit number.

Referenced by adjustWithNodalPeriod(), ANXTime(), getOrbitInfo(), operator-(), operator<(), operator=(), operator==(), operator>(), and EECFI::RelANXTime::toAbsolute().

long EECFI::ANXTime::seconds

Seconds since the ANX.

Referenced by adjustWithNodalPeriod(), ANXTime(), operator+(), operator-(), operator<(), operator=(), operator==(), operator>(), and EECFI::RelANXTime::toAbsolute().