Changeset 1539 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Aug 13, 2004, 2:58:46 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r1538 r1539 1 %%% $Id: psLibSDRS.tex,v 1.7 1 2004-08-14 00:38:27jhoblitt Exp $1 %%% $Id: psLibSDRS.tex,v 1.72 2004-08-14 00:58:46 jhoblitt Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 3029 3029 \subsection{Dates and times} 3030 3030 3031 \subsubsection{Overview} 3032 3031 3033 We require a collection of functions to manipulate time data. These operations 3032 3034 primarily consist of conversions between specific time formats. Internally, … … 3034 3036 has been extended to track the time system being represented. 3035 3037 3038 Conversion from one time system to another is achived by converting first to 3039 TAI and then to the destination type. This allows arbitarily many time system 3040 to be supported by merely add functions to convert to and from TAI. 3041 3042 \subsubsection{Generic Data Structures} 3043 3036 3044 \begin{verbatim} 3037 3045 typedef 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) 3042 3050 } psTimeType; 3043 3051 3044 3052 typedef 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 3048 3056 } psTime; 3049 3057 \end{verbatim} 3058 3059 \subsubsection{Current Date and Time} 3050 3060 3051 3061 A number of functions are provided to get the current time in a particular time … … 3061 3071 \end{verbatim} 3062 3072 3073 \subsubsection{Automatic Date and Time Type Conversion} 3074 3063 3075 When converting to a time system the source time system is automaticaly 3064 3076 converted to TAI and then from TAI to the destination type. … … 3073 3085 \end{verbatim} 3074 3086 3087 \subsubsection{Date and Time Formatting} 3088 3075 3089 A collection of functions convert from the \code{psTime} types to various 3076 3090 external formats. Note that ISO8601 format is "YYYY-MM-DDThh:mm:ss,sZ" … … 3081 3095 \end{verbatim} 3082 3096 3097 \subsubsection{Date and Time Parsing} 3098 3083 3099 A related collection of functions convert from external formats to a 3084 3100 \code{psTime} type. … … 3088 3104 psTime *psParseTimeval(psTimeType type, struct timeval *input); 3089 3105 \end{verbatim} 3106 3107 \subsubsection{Date and Time System Support} 3090 3108 3091 3109 All \code{psTime} types must be able to be converted to to the TAI type. … … 3099 3117 3100 3118 A utility function provides the current time from the system clock, in correct TAI units: 3119 3101 3120 \begin{verbatim} 3102 3121 psTime *psTAIToUT1(psTime *time); … … 3109 3128 \end{verbatim} 3110 3129 3130 \subsubsection{Utility Functions} 3131 3111 3132 A number of utility functions is needed for type conversion. 3112 3133 … … 3140 3161 double psGetUT1Delta(psTime *tai); 3141 3162 \end{verbatim} 3163 3164 \subsubsection{Date and Time Math} 3142 3165 3143 3166 Time math is only done on the \code{psTime} TAI type.
Note:
See TracChangeset
for help on using the changeset viewer.
