IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1539


Ignore:
Timestamp:
Aug 13, 2004, 2:58:46 PM (22 years ago)
Author:
jhoblitt
Message:

date and time section formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r1538 r1539  
    1 %%% $Id: psLibSDRS.tex,v 1.71 2004-08-14 00:38:27 jhoblitt Exp $
     1%%% $Id: psLibSDRS.tex,v 1.72 2004-08-14 00:58:46 jhoblitt Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    30293029\subsection{Dates and times}
    30303030
     3031\subsubsection{Overview}
     3032
    30313033We require a collection of functions to manipulate time data.  These operations
    30323034primarily consist of conversions between specific time formats.  Internally,
     
    30343036has been extended to track the time system being represented.
    30353037
     3038Conversion from one time system to another is achived by converting first to
     3039TAI and then to the destination type.  This allows arbitarily many time system
     3040to be supported by merely add functions to convert to and from TAI.
     3041
     3042\subsubsection{Generic Data Structures}
     3043
    30363044\begin{verbatim}
    30373045typedef enum {
    3038     PS_TIME_TAI,                    /* seconds since 1970-01-01T00:00:00Z (Gregorian) */
    3039     PS_TIME_UTC,                    /* seconds since 1970-01-01T00:00:00Z (Gregorian) */
    3040     PS_TIME_UT1,                    /* seconds since 1970-01-01T00:00:00Z (Gregorian) */
    3041     PS_TIME_LST,                    /* seconds since 1970-01-01T00:00:00Z (Gregorian) */
     3046    PS_TIME_TAI,                    ///< seconds since 1970-01-01T00:00:00Z (Gregorian)
     3047    PS_TIME_UTC,                    ///< seconds since 1970-01-01T00:00:00Z (Gregorian)
     3048    PS_TIME_UT1,                    ///< seconds since 1970-01-01T00:00:00Z (Gregorian)
     3049    PS_TIME_LST,                    ///< seconds since 1970-01-01T00:00:00Z (Gregorian)
    30423050} psTimeType;
    30433051
    30443052typedef struct {
    3045     psU64            sec;           /* seconds */
    3046     psU32            nsec;          /* nanoseconds */
    3047     psTimeType       type;          /* type of time */
     3053    psU64            sec;           ///< seconds
     3054    psU32            nsec;          ///< nanoseconds
     3055    psTimeType       type;          ///< type of time
    30483056} psTime;
    30493057\end{verbatim}
     3058
     3059\subsubsection{Current Date and Time}
    30503060
    30513061A number of functions are provided to get the current time in a particular time
     
    30613071\end{verbatim}
    30623072
     3073\subsubsection{Automatic Date and Time Type Conversion}
     3074
    30633075When converting to a time system the source time system is automaticaly
    30643076converted to TAI and then from TAI to the destination type.
     
    30733085\end{verbatim}
    30743086
     3087\subsubsection{Date and Time Formatting}
     3088
    30753089A collection of functions convert from the \code{psTime} types to various
    30763090external formats.  Note that ISO8601 format is "YYYY-MM-DDThh:mm:ss,sZ"
     
    30813095\end{verbatim}
    30823096
     3097\subsubsection{Date and Time Parsing}
     3098
    30833099A related collection of functions convert from external formats to a
    30843100\code{psTime} type.
     
    30883104psTime *psParseTimeval(psTimeType type, struct timeval *input);
    30893105\end{verbatim}
     3106
     3107\subsubsection{Date and Time System Support}
    30903108
    30913109All \code{psTime} types must be able to be converted to to the TAI type.
     
    30993117
    31003118A utility function provides the current time from the system clock, in correct TAI units:
     3119
    31013120\begin{verbatim}
    31023121psTime *psTAIToUT1(psTime *time);
     
    31093128\end{verbatim}
    31103129
     3130\subsubsection{Utility Functions}
     3131
    31113132A number of utility functions is needed for type conversion.
    31123133
     
    31403161double psGetUT1Delta(psTime *tai);
    31413162\end{verbatim}
     3163
     3164\subsubsection{Date and Time Math}
    31423165
    31433166Time math is only done on the \code{psTime} TAI type.
Note: See TracChangeset for help on using the changeset viewer.