| Earth Observation Mission CFI Software Lib Software User Manual |

Public Member Functions | Public Attributes

# EECFI::Time Class Reference

Base class for Time objects. More...

Inheritance diagram for EECFI::Time:

List of all members.

## Public Member Functions
| Time (double value=0, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC)
| Class constructor without time correlations.
| Time (TimeCorrelation timeCorr, double value=0, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC)
| Class constructor (time correlations).
| ~Time ()
| Class destructor.
void | setAscii (string asciiTime, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_ASCII_STD) throw (CfiError)
| Set time in ASCII format.
void | setTransport (long transportTime[4], long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_TRANS_STD) throw (CfiError)
| Set time in Transport format. For a description of transport time array elements, see method getTransport.
void | setProcessing (double procTime, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC)
| Set time in Processing format.
void | getAscii (string &asciiTime, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_ASCII_STD) throw (CfiError)
| Get time in ASCII format.
void | getTransport (long transportTime[4], long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_TRANS_STD) throw (CfiError)
| Get time in transport format.
Time | getProcessing (long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC) throw (CfiError)
| Get the time in processing days (J2000) for the requested reference and format.
void | change (long reference, long timeFormat=XLCFI_PROC) throw (CfiError)
| Change the time reference and format.
void | now ()
| Get current system date and time.
void | setBOM ()
| Set time to Beggining of mission (BOM).
void | setEOM ()
| Set time to End of mission (EOM).
Time | operator+ (const double d) const
| Operator + (add a time duration).
Time | operator- (const double d) const
| Operator - (subtract a time duration).
double | operator- (const Time &t) const throw (CfiError)
| Time difference between Time objects.
bool | operator> (const Time &t) const throw (CfiError)
| Operator > .
bool | operator< (const Time &t) const throw (CfiError)
| Operator < .
bool | operator>= (const Time &t) const throw (CfiError)
| Operator >= .
bool | operator<= (const Time &t) const throw (CfiError)
| Operator <= .
bool | operator== (const Time &t) const throw (CfiError)
| Operator ==.
bool | operator!= (const Time &t) const throw (CfiError)
| Operator != .
## Public Attributes
double | time
| Time value (J2000 days).
long | ref
| Time reference (XLTimeRefEnum).
long | format
| Time format (TimeAsciiEnum / TimeTransEnum).

## Detailed Description

Base class for Time objects.

## Constructor & Destructor Documentation

EECFI::Time::Time | ( | double | value = `0`,
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_PROC` |
| ) |  |  |

Class constructor without time correlations.

Parameters:

  | value | Time in Julian days (J2000) .
  | reference | Time reference.
  | timeFormat | Time format.

References format, ref, and time.

EECFI::Time::Time | ( | TimeCorrelation | timeCorr,
|  | double | value = `0`,
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_PROC` |
| ) |  |  |

Class constructor (time correlations).

Parameters:

  | timeCorr | Time correlation.
  | value | Time in Julian days (J2000) .
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format.

References format, ref, and time.

EECFI::Time::~Time | ( |  | ) | `[inline]`

Class destructor.

## Member Function Documentation

void EECFI::Time::change | ( | long | reference,
|  | long | timeFormat = `XLCFI_PROC` |
| ) |  |  | throw (CfiError)

Change the time reference and format.

Parameters:

  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format TimeProcEnum.

Referenced by EECFI::SmosObt::setObt(), EECFI::GoceObt::setObt(), EECFI::EnvisatObt::setObt(), and EECFI::AeolusObt::setObt().

void EECFI::Time::getAscii | ( | string & | asciiTime,
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_ASCII_STD` |
| ) |  |  | throw (CfiError)

Get time in ASCII format.

Parameters:

  | asciiTime | [OUTPUT] Time in ascii format.
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format (TimeAsciiEnum).

Time EECFI::Time::getProcessing | ( | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_PROC` |
| ) |  |  | throw (CfiError)

Get the time in processing days (J2000) for the requested reference and format.

Parameters:

  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format (TimeProcEnum).

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

void EECFI::Time::getTransport | ( | long | transportTime[4],
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_TRANS_STD` |
| ) |  |  | throw (CfiError)

Get time in transport format.

The meanings and units of the different array elements from the Transport time strongly depend upon the selected Transport format (by means of the Transport format ID). The table below shows the choices:

Input | Array Element | Unit (Format) | Allowed Range
--- | --- | --- | ---
XL_TRANS_STD | [0] | Integer days | [-18262,36524]
[1] | Integer seconds | [0,86399]
[2] | Integer microseconds | [0,999999]
XL_TRANS_ENVI_GS | [0] | Integer days | [-18262,36524]
[1] | Integer seconds | [0,86399]
[2] | Integer microseconds | [0,999999]
XL_TRANS_CRYO_GS | [0] | Integer days | [-18262,36524]
[1] | Integer seconds | [0,86399]
[2] | Integer microseconds | [0,999999]
XL_TRANS_CRYO_TM | [0] | Integer days | [-18262,36524]
[1] | Integer milliseconds | [0,86399999]
[2] | Integer microseconds | [0,999]
XL_TRANS_CRYO_TM_SIRAL | [0] | Integer days | [-18262,36524]
[1] | Integer milliseconds | [0,86399999]
[2] | Integer microseconds | [0,999]
[3] | SIRAL extra counter | [0,1745454545]
XL_TRANS_SMOS_TM | [0] | Week number | [-1566, 6260]
[1] | Seconds of week | [0, 604799]
| [2] | Fraction of seconds | [0, 65535]

Parameters:

  | transportTime | [OUTPUT] Time in transport format.
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format (TimeTransEnum).

void EECFI::Time::now | ( |  | ) |

Get current system date and time.

Sets the time object to the current system date.

bool EECFI::Time::operator!= | ( | const Time & | t | ) | const throw (CfiError)

Operator != .

Parameters:

  | t | Time to compare.

Returns:
  Result of comparison.

Time EECFI::Time::operator+ | ( | const double | d | ) | const

Operator + (add a time duration).

Parameters:

  | d | Time duration in processing days.

Returns:
  Added time.

References time.

Time EECFI::Time::operator- | ( | const double | d | ) | const

Operator - (subtract a time duration).

Parameters:

  | d | Time duration in processing days.

Returns:
  Subtracted time.

References time.

double EECFI::Time::operator- | ( | const Time & | timeIn | ) | const throw (CfiError)

Time difference between Time objects.

Parameters:

  | timeIn | Time object to be subtracted in Processing format.

Returns:
  Time diference.

References format, getProcessing(), ref, and time.

bool EECFI::Time::operator< | ( | const Time & | t | ) | const throw (CfiError)

Operator < .

Parameters:

  | t | Time to compare.

Returns:
  Result of comparison.

bool EECFI::Time::operator<= | ( | const Time & | t | ) | const throw (CfiError)

Operator <= .

Parameters:

  | t | Time to compare.

Returns:
  Result of comparison.

bool EECFI::Time::operator== | ( | const Time & | timeIn | ) | const throw (CfiError)

Operator ==.

Parameters:

  | timeIn | Time to compare.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg(), format, getProcessing(), ref, and time.

bool EECFI::Time::operator> | ( | const Time & | timeIn | ) | const throw (CfiError)

Operator > .

Parameters:

  | timeIn | Time object to compare.

Returns:
  Result of comparison.

References EECFI::CfiError::addMsg(), format, getProcessing(), ref, and time.

bool EECFI::Time::operator>= | ( | const Time & | t | ) | const throw (CfiError)

Operator >= .

Parameters:

  | t | Time to compare.

Returns:
  Result of comparison.

void EECFI::Time::setAscii | ( | string | asciiTime,
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_ASCII_STD` |
| ) |  |  | throw (CfiError)

Set time in ASCII format.

Class destructor.

Parameters:

  | asciiTime | Time in ASCII date format.
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format (TimeAsciiEnum).

void EECFI::Time::setBOM | ( |  | ) |

Set time to Beggining of mission (BOM).

void EECFI::Time::setEOM | ( |  | ) |

Set time to End of mission (EOM).

void EECFI::Time::setProcessing | ( | double | procTime,
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_PROC` |
| ) |  |  |

Set time in Processing format.

Parameters:

  | procTime | Time in processing format.
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format.

References format, ref, and time.

void EECFI::Time::setTransport | ( | long | transportTime[4],
|  | long | reference = `XLCFI_TIME_TAI`,
|  | long | timeFormat = `XLCFI_TRANS_STD` |
| ) |  |  | throw (CfiError)

Set time in Transport format. For a description of transport time array elements, see method getTransport.

Parameters:

  | transportTime | Time in transport format.
  | reference | Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
  | timeFormat | Time format (TimeTransEnum).

## Member Data Documentation

long EECFI::Time::format

Time format (TimeAsciiEnum / TimeTransEnum).

Referenced by operator-(), operator==(), operator>(), EECFI::SmosObt::setObt(), EECFI::GoceObt::setObt(), EECFI::EnvisatObt::setObt(), EECFI::AeolusObt::setObt(), setProcessing(), and Time().

long EECFI::Time::ref

Time reference (XLTimeRefEnum).

Referenced by operator-(), operator==(), operator>(), setProcessing(), and Time().

double EECFI::Time::time

Time value (J2000 days).

Referenced by operator+(), operator-(), operator==(), operator>(), EECFI::SmosObt::setObt(), EECFI::GoceObt::setObt(), EECFI::EnvisatObt::setObt(), EECFI::AeolusObt::setObt(), setProcessing(), and Time().