IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2004, 8:10:19 PM (22 years ago)
Author:
eugene
Message:

added a variety of time format conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psDateTime.h

    r247 r256  
    55 *  \brief Dates and Times
    66 *  \ingroup AstroGroup
     7 * 
     8 *  The functions in this file define a set of conversions between different time systems and representations.
     9 *  All convert to and from the PSLib internal time data value (TAI - TBR).  Available time representations
     10 *  include: TAI (taia type), UTC (?), MJD (double?), ISO ISO point-in-time (YYYY-MM-DD,HH:MM:SS.SSS),
    711 */
    812
    913/** Get current MJD, for a timestamp */
    10 float
     14double
    1115psGetMJD(void);
    1216
    13 /** Convert MJD to Human-readable date/time string */
     17/** Get current sidereal time at longitude */
     18double
     19psGetSidereal(float mjd,                //!< MJD
     20              float longitude)          //!< Longitude
     21;
     22
     23/***** convert from psTime *****/
     24/** Convert psTime to ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS) */
    1425char *
    15 psMJDToTime(float mjd                   //!< Input MJD
    16             );
     26psTimeToISOTime (psTime time)           //!< Input psTime time
     27;
    1728
    18 /** Get Sidereal time */
    19 float
    20 psGetSidereal(float mjd,                //!< MJD
    21               float longitude           //!< Longitude
    22               );
     29/** Convert psTime to UTC */
     30double
     31psTimeToUTC (psTime time)               //!< Input psTime time
     32;
     33
     34/** Convert psTime to MJD */
     35double
     36psTimeToMJD (psTime time)               //!< Input psTime time
     37;
     38
     39/** Convert psTime to JD */
     40double
     41psTimeToJD (psTime time)                        //!< Input psTime time
     42;
     43
     44/** Convert psTime to timeval (struct timeval) */
     45struct timeval *
     46psTimeToTimeval (psTime time)           //!< Input psTime time
     47;
     48
     49/** Convert psTime to broken-down time (struct tm) */
     50struct tm *
     51psTimeToTm (psTime time)                        //!< Input psTime time
     52;
     53
     54/***** convert to psTime *****/
     55/** Convert ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS) to psTime */
     56psTime *
     57psISOTimeToTime (char *input)           //!< Input ISOTime time
     58;
     59
     60/** Convert UTC to psTime */
     61psTime *
     62psUTCToTime (double input)              //!< Input UTC time
     63;
     64
     65/** Convert MJD to psTime */
     66psTime *
     67psMJDToTime (double input)              //!< Input MJD time
     68;
     69
     70/** Convert JD to psTime */
     71psTime *
     72psJDToTime (double input)               //!< Input JD time
     73;
     74
     75/** Convert timeval to psTime (struct timeval) */
     76psTime *
     77psTimevalToTime (struct timeval *input) //!< Input timeval time
     78;
     79
     80/** Convert broken-to psTime down time (struct tm) */
     81psTime *
     82psTMtoTime (struct tm *input)           //!< Input tm time
     83;
    2384
    2485#endif
     86
     87/* date/time representations of interest:
     88
     89  TAI -
     90  UTC - long? float? double?
     91  MJD - double?
     92  ISO - yyyy-mm-dd hh:mm:ss +oooo
     93  point-in-time YYYY/MM/DD,HH:MM:SS.SSS
     94  timeval
     95 
     96*/
Note: See TracChangeset for help on using the changeset viewer.