A collection of functions are required by psLib to manipulate time data. These functions primarily consist of conversions between specific time formats. They use the UNIX timeval time system as the base upon which International Atomic Time (TAI) and Universal Time Coordinated (UTC) are calculated.
Definition in file psTime.h.
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include "psType.h"
#include "psImage.h"
#include "psLookupTable.h"
#include "psCoord.h"
Include dependency graph for psTime.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Enumerations | |
| enum | psTimeType { PS_TIME_TAI, PS_TIME_UTC, PS_TIME_UT1, PS_TIME_TT } |
| Time type. More... | |
| enum | psTimeBulletin { PS_IERS_A, PS_IERS_B } |
| Time Bulletin type. More... | |
Functions | |
| psBool | p_psTimeInit (const char *fileName) |
| Initialize time data. | |
| psBool | p_psTimeFinalize (void) |
| Free memory persistant time data. | |
| psTime * | psTimeAlloc (psTimeType type) |
| Allocate time struct. | |
| bool | psMemCheckTime (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psTime * | psTimeGetNow (psTimeType type) |
| Get current time. | |
| psTime * | psTimeConvert (psTime *time, psTimeType type) |
| Convert psTime to UTC or TAI time. | |
| double | psTimeToLMST (psTime *time, double longitude) |
| Convert psTime to Local Mean Sidereal Time (LMST). | |
| double | psTimeGetUT1Delta (const psTime *time, psTimeBulletin bulletin) |
| Determine UT1 - UTC from table lookup. | |
| psF64 | p_psTimeGetTAIDelta (const psTime *time) |
| Determine TAI - UTC from table lookup. | |
| psSphere * | p_psTimeGetPoleCoords (const psTime *time) |
| Determine polar coordinates at a given time. | |
| long | psTimeLeapSecondDelta (const psTime *time1, const psTime *time2) |
| Calculate the number of leapseconds between two times. | |
| bool | psTimeIsLeapSecond (const psTime *utc) |
| Determine if UTC time is a leapsecond. | |
| double | psTimeToJD (const psTime *time) |
| Convert psTime to Julian date time. | |
| double | psTimeToMJD (const psTime *time) |
| Convert psTime to modified Julian date time. | |
| psString | psTimeToISO (const psTime *time) |
| Convert psTime to ISO8601 formatted string. | |
| timeval * | psTimeToTimeval (const psTime *time) |
| Convert psTime to timeval time. | |
| psTime * | psTimeFromJD (double jd) |
| Convert JD to psTime. | |
| psTime * | psTimeFromMJD (double mjd) |
| Convert MJD to psTime. | |
| psTime * | psTimeFromISO (const char *input, psTimeType type) |
| Convert ISO to psTime. | |
| psTime * | psTimeFromTimeval (const struct timeval *input) |
| Convert timeval to psTime. | |
| psTime * | psTimeFromTT (psS64 sec, psU32 nsec) |
| Convert Terrestrial Time to psTime. | |
| psTime * | psTimeFromUTC (psS64 sec, psU32 nsec, bool leapsecond) |
| Convert UTC time to psTime. | |
| psTime * | p_psTimeFromTM (const struct tm *time) |
| Convert tm time to psTime. | |
| psTime * | psTimeMath (const psTime *time, double delta) |
| Adds delta to time. | |
| double | psTimeDelta (const psTime *time1, const psTime *time2) |
| Determine difference between two times. | |
| char * | p_psGetConfigFileName () |
| Get the filename of the psLib configuration file. | |
| psF64 | p_psTimeSearchTables (psF64 index, psU64 column, char *metadataTableNames[], psU32 nTables, psLookupStatusType *status) |
1.4.2