DEIMOS
Earth Observation Mission CFI Software
Lib Software User Manual
ESA

EECFI::Time Class Reference

Base class for Time objects. More...

Inheritance diagram for EECFI::Time:
EECFI::CfiClass

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 (const TimeCorrelation &timeCorr, double value=0, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC)
 Class constructor (time correlations).
void setAscii (const std::string &asciiTime, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_ASCII_STD)
 Set time in ASCII format.
void setTransport (long transportTime[4], long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_TRANS_STD)
 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 setCuc (unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], const CucTimeConfig &config, long reference=XLCFI_TIME_TAI)
 Set time using CCSDS UNSEGMENTED TIME CODE (CUC) format.
void getAscii (std::string &asciiTime, long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_ASCII_STD) const
 Get time in ASCII format.
void getTransport (long transportTime[4], long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_TRANS_STD) const
 Get time in transport format.
Time getProcessing (long reference=XLCFI_TIME_TAI, long timeFormat=XLCFI_PROC) const
 Get the time in processing days (J2000) for the requested reference and format.
void getCuc (unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], const CucTimeConfig &config, long reference=XLCFI_TIME_TAI) const
 Get time in CCSDS UNSEGMENTED TIME CODE (CUC) format.
void change (long reference, long timeFormat=XLCFI_PROC)
 Change the time reference and format.
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
 Time difference between Time objects.
bool operator> (const Time &t) const
 Operator > .
bool operator< (const Time &t) const
 Operator < .
bool operator>= (const Time &t) const
 Operator >= .
bool operator<= (const Time &t) const
 Operator <= .
bool operator== (const Time &t) const
 Operator ==.
bool operator!= (const Time &t) const
 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 
) [explicit]

Class constructor without time correlations.

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

Referenced by getProcessing().

EECFI::Time::Time ( const TimeCorrelation timeCorr,
double  value = 0,
long  reference = XLCFI_TIME_TAI,
long  timeFormat = XLCFI_PROC 
) [explicit]

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.

Member Function Documentation

void EECFI::Time::change ( long  reference,
long  timeFormat = XLCFI_PROC 
)

Change the time reference and format.

Parameters:
reference Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).
timeFormat Time format TimeProcEnum.

References format, ref, EECFI::CfiClass::throwWarn, and time.

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

void EECFI::Time::getAscii ( std::string &  asciiTime,
long  reference = XLCFI_TIME_TAI,
long  timeFormat = XLCFI_ASCII_STD 
) const

Get time in ASCII format.

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

References format, ref, EECFI::CfiClass::throwWarn, and time.

void EECFI::Time::getCuc ( unsigned char  cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH],
const CucTimeConfig config,
long  reference = XLCFI_TIME_TAI 
) const

Get time in CCSDS UNSEGMENTED TIME CODE (CUC) format.

Parameters:
cucTime [OUTPUT] CUC time.
config CUC time configuration.
reference Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF). This parameter is not used in current implementation.

References EECFI::CucTimeConfig::basicTimeUnitNumOctets, EECFI::CucTimeConfig::cucType, EECFI::CucTimeConfig::epoch, EECFI::CucTimeConfig::epochType, EECFI::CucTimeConfig::fractionalTimeUnitNumOctets, ref, EECFI::CfiClass::throwWarn, time, and EECFI::CucTimeConfig::timeRef.

Time EECFI::Time::getProcessing ( long  reference = XLCFI_TIME_TAI,
long  timeFormat = XLCFI_PROC 
) const

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).

References format, ref, EECFI::CfiClass::throwWarn, Time(), and time.

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

void EECFI::Time::getTransport ( long  transportTime[4],
long  reference = XLCFI_TIME_TAI,
long  timeFormat = XLCFI_TRANS_STD 
) const

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).

References format, ref, EECFI::CfiClass::throwWarn, and time.

bool EECFI::Time::operator!= ( const Time t  )  const

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

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

Operator < .

Parameters:
t Time to compare.
Returns:
Result of comparison.
bool EECFI::Time::operator<= ( const Time t  )  const

Operator <= .

Parameters:
t Time to compare.
Returns:
Result of comparison.
bool EECFI::Time::operator== ( const Time timeIn  )  const

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

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

Operator >= .

Parameters:
t Time to compare.
Returns:
Result of comparison.
void EECFI::Time::setAscii ( const std::string &  asciiTime,
long  reference = XLCFI_TIME_TAI,
long  timeFormat = XLCFI_ASCII_STD 
)

Set time in ASCII format.

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

References format, ref, EECFI::CfiClass::throwWarn, and time.

void EECFI::Time::setBOM (  ) 

Set time to Beggining of mission (BOM).

void EECFI::Time::setCuc ( unsigned char  cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH],
const CucTimeConfig config,
long  reference = XLCFI_TIME_TAI 
)

Set time using CCSDS UNSEGMENTED TIME CODE (CUC) format.

Parameters:
cucTime CUC time.
config CUC time configuration.
reference Time reference (XLTimeRefEnum except XLCFI_TIME_UNDEF).

References EECFI::CucTimeConfig::basicTimeUnitNumOctets, EECFI::CucTimeConfig::cucType, EECFI::CucTimeConfig::epoch, EECFI::CucTimeConfig::epochType, format, EECFI::CucTimeConfig::fractionalTimeUnitNumOctets, ref, EECFI::CfiClass::throwWarn, time, and EECFI::CucTimeConfig::timeRef.

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 
)

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).

References format, ref, EECFI::CfiClass::throwWarn, and time.


Member Data Documentation


Generated on Mon Dec 11 2023 13:28:22 for by doxygen 1.7.1