Time element operations


Functions

SCT_RET sct_add_deltaDSF (sct_time_ptr pDest, const sct_time_ptr pSource, const long nDays, const long nSeconds, const long nFemtosecs)
SCT_RET sct_add_delta (sct_time_ptr pDest, const sct_time_ptr pSource, const sct_time_ptr pDelta)
SCT_RET sct_diff (sct_time_ptr pDeltaDest, const sct_time_ptr pEpoch1, const sct_time_ptr pEpoch2)
int sct_compare (const sct_time_ptr pEpoch1, const sct_time_ptr pEpoch2, const double epsilon)

Detailed Description

This group of functions contain the whole list of methods which can be used to operate with time elements.

Function Documentation

SCT_RET sct_add_delta ( sct_time_ptr  pDest,
const sct_time_ptr  pSource,
const sct_time_ptr  pDelta 
)

Function to add a delta element to a epoch element

Parameters:
pDest (OUT) Pointer to the output sct_time element. This pointer can be the same as the one in pSource.
pSource (IN) Pointer to the input base sct_time epoch element.
pDelta (IN) Pointer to the input sct_time delta element
Returns:
SCT_RET return value. If SCT_RET_OK is not returned, the element might not be correctly set.

Definition at line 44 of file sct_operations.c.

References _sct_time_base::accuracy, _sct_time_base::days, _sct_time_base::fsecs, sct_copy(), SCT_FSECS_IN_SEC, SCT_RET_INVALID_PTR, SCT_RET_NOT_INITIALISED, SCT_RET_OK, SCT_SECS_IN_DAY, SCT_STATUS_DELTA, SCT_STATUS_OK, _sct_time_base::secs, and _sct_time_base::status.

Referenced by sct_add_deltaDSF(), sct_from_GPS_to_UTC(), sct_from_TAI_to_UTC(), sct_from_UTC_to_GPS(), and sct_from_UTC_to_TAI().

Here is the call graph for this function:

SCT_RET sct_add_deltaDSF ( sct_time_ptr  pDest,
const sct_time_ptr  pSource,
const long  nDays,
const long  nSeconds,
const long  nFemtosecs 
)

Function to add a delta element to a epoch element

Parameters:
pDest (OUT) Pointer to the output sct_time element. This pointer can be the same as the one in pSource.
pSource (IN) Pointer to the input base sct_time epoch element
nDays (IN) Number of days to be added to the base epoch
nSeconds (IN) Number of seconds to be added to the base epoch
nFemtosecs (IN) Number of femptoseconds to be added to the base epoch
Returns:
SCT_RET return value. If SCT_RET_OK is not returned, the element might not be correctly set.

Definition at line 23 of file sct_operations.c.

References _sct_time_base::accuracy, _sct_time_base::days, _sct_time_base::fsecs, SCT_ACCURACY_FEMTOSECS, sct_add_delta(), SCT_STATUS_DELTA, _sct_time_base::secs, and _sct_time_base::status.

Referenced by main(), sct_from_GPS_to_TAI(), sct_from_GPS_to_UTC(), sct_from_TAI_to_GPS(), and sct_from_UTC_to_GPS().

Here is the call graph for this function:

int sct_compare ( const sct_time_ptr  pEpoch1,
const sct_time_ptr  pEpoch2,
const double  epsilon 
)

Function to compare two epoch elements.

Parameters:
pEpoch1 (IN) Pointer to the first sct_time epoch element.
pEpoch2 (IN) Pointer to the second sct_time epoch element
epsilon (IN) Epsilon value in seconds
Returns:
integer value. If (pEpoch1 - pEpoch2) > epsilon will return 1 (pEpoch1 greater) If epsilon > |pEpoch1 - pEpoch2| will return 0 (pEpoch1 and pEpoch2 equal) If (pEpoch2 - pEpoch1) > epsilon will return -1 (pEpoch2 greater)

Definition at line 250 of file sct_operations.c.

References sct_diff(), and sct_get_delta_secs().

Referenced by main().

Here is the call graph for this function:

SCT_RET sct_diff ( sct_time_ptr  pDeltaDest,
const sct_time_ptr  pEpoch1,
const sct_time_ptr  pEpoch2 
)

Function to find the delta time between two epoch elements (pEpoch1 - pEpoch2)

Parameters:
pDeltaDest (OUT) Pointer to the output sct_time delta element.
pEpoch1 (IN) Pointer to the first sct_time epoch element.
pEpoch2 (IN) Pointer to the second sct_time epoch element
Returns:
SCT_RET return value. If SCT_RET_OK is not returned, the delta element might not be correctly set.

Definition at line 151 of file sct_operations.c.

References _sct_time_base::accuracy, _sct_time_base::days, _sct_time_base::fsecs, SCT_FSECS_IN_SEC, SCT_RET_INVALID_PTR, SCT_RET_NOT_INITIALISED, SCT_RET_OK, SCT_SECS_IN_DAY, SCT_STATUS_DELTA, SCT_STATUS_OK, _sct_time_base::secs, and _sct_time_base::status.

Referenced by main(), and sct_compare().


Generated on Sun May 20 15:32:58 2007 for scitime by  doxygen 1.5.1