Changeset 1247 for trunk/psLib/src/astro/psTime.h
- Timestamp:
- Jul 20, 2004, 3:29:33 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psTime.h (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.h
r1223 r1247 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-07- 15 19:02:13$14 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-07-21 01:29:22 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 /// @addtogroup Time 30 30 /// @{ 31 32 /******************************************************************************/ 33 /* DEFINE STATEMENTS */ 34 /******************************************************************************/ 35 36 /** Number of available leapsecond updates */ 37 #define NUM_LEAPSECOND_UPDATES 23 38 39 /** Maximum length of time string */ 40 #define MAX_TIME_STRING_LENGTH 256 41 42 /** Seconds per minute */ 43 #define SEC_PER_MINUTE 60 44 45 /** Seconds per hour */ 46 #define SEC_PER_HOUR 60*SEC_PER_MINUTE 47 48 /** Seconds per day */ 49 #define SEC_PER_DAY 24*SEC_PER_HOUR 50 51 /** Seconds per year */ 52 #define SEC_PER_YEAR 365*SEC_PER_DAY 53 54 /** Microseconds per day */ 55 #define USEC_PER_DAY 86400000000.0 31 56 32 57 /******************************************************************************/ … … 63 88 /** Convert psTime to ISO time in TAI units. 64 89 * 65 * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS. Th e result from this66 * function is in TAI units.67 * 68 * @return char*: Pointer null terminated array of chars in ISO /TAItime.90 * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS. This function assumes 91 * the input time already is in TAI time and does not add or subtract leapseconds. 92 * 93 * @return char*: Pointer null terminated array of chars in ISO time. 69 94 */ 70 95 char* psTimeToISO( … … 74 99 /** Convert psTime to UTC time. 75 100 * 76 * Converts psTime to UTC time in double precision floating point notation. The result from this function is 77 * not in TAI units, but that of UTC, which does not contain leapseconds. 78 * 79 * @return double: UTC time in floating point notation. 80 */ 81 double psTimeToUTC( 101 * Converts psTime to UTC time in double precision floating point notation. The input to this must already be 102 * int TAI time. The result from this function is not in TAI units, but that of UTC, which does not contain 103 * leapseconds. 104 * 105 * @return psTime: UTC time psTime format. 106 */ 107 psTime psTimeToUTC( 82 108 psTime time /** Input time to be converted. */ 83 109 ); … … 85 111 /** Convert psTime to modified Julian date time. 86 112 * 87 * Converts psTime to modified Julian date (MJD) time. The result from this function is in TAI units. 88 * 89 * @return double: MJD/TAI time in floating point notation. 113 * Converts psTime to modified Julian date (MJD) time. This function assumes the input time already is in TAI 114 * time and does not add or subtract leapseconds. 115 * 116 * @return double: Modified Julian Days (MJD) time. 90 117 */ 91 118 double psTimeToMJD( … … 95 122 /** Convert psTime to Julian date time. 96 123 * 97 * Converts psTime to Julian date (JD) time. The result from this function is in TAI units. 98 * 99 * @return double: JD/TAI time in floating point notation. 124 * Converts psTime to Julian date (JD) time. This function assumes the input time already is in TAI time and 125 * does not add or subtract leapseconds. 126 * 127 * @return double: Julian Date (JD) time. 100 128 */ 101 129 double psTimeToJD( … … 105 133 /** Convert psTime to timeval time. 106 134 * 107 * Converts psTime to timeval time. The result from this function is in TAI units. 108 * 109 * @return timeval: timeval/TAI time. 135 * Converts psTime to timeval time. This function assumes the input time already is in TAI time and does not 136 * add or subtract leapseconds. 137 * 138 * @return timeval: timeval struct time. 110 139 */ 111 140 struct timeval psTimeToTimeval( … … 115 144 /** Convert psTime to tm time. 116 145 * 117 * Converts psTime to tm time. The result from this function is in TAI units. 118 * 119 * @return tm: tm/TAI time. 146 * Converts psTime to tm time. This function assumes the input time already is in TAI time and does not add or 147 * subtract leapseconds. 148 * 149 * @return tm: tm struct time. 120 150 */ 121 151 struct tm* psTimeToTM( … … 125 155 /** Convert ISO to psTime. 126 156 * 127 * Converts ISO time to psTime. The result from this function is in TAI units. 157 * Converts ISO time to psTime. This function assumes the input time already is in TAI time and does not add 158 * or subtract leapseconds. 159 * 160 * @return psTime: time 161 */ 162 psTime psISOToTime( 163 char *time /** Input time to be converted. */ 164 ); 165 166 /** Convert UTC to psTime. 167 * 168 * Converts UTC time to psTime. This function assumes the input time already is in TAI time and add or 169 * subtracts the necessary leapseconds. 128 170 * 129 171 * @return psTime: time in TAI units. 130 172 */ 131 psTime psISOToTime(char *time); 132 133 /** Convert UTC to psTime. 134 * 135 * Converts UTC time to psTime. The result from this function is in TAI units. 136 * 137 * @return psTime: time in TAI units. 138 */ 139 psTime psUTCToTime(double time); 173 psTime psUTCToTime( 174 psTime time /** Input time to be converted. */ 175 ); 140 176 141 177 /** Convert MJD to psTime. 142 178 * 143 * Converts MJD time to psTime. The result from this function is in TAI units. 144 * 145 * @return psTime: time in TAI units. 146 */ 147 psTime psMJDToTime(double time); 179 * Converts MJD time to psTime. This function assumes the input time already is in TAI time and does not add 180 * or subtract leapseconds. 181 * 182 * @return psTime: time. 183 */ 184 psTime psMJDToTime( 185 double time /** Input time to be converted. */ 186 ); 148 187 149 188 /** Convert JD to psTime. 150 189 * 151 * Converts JD time to psTime. The result from this function is in TAI units. 152 * 153 * @return psTime: time in TAI units. 154 */ 155 psTime psJDToTime(double time); 190 * Converts JD time to psTime. This function assumes the input time already is in TAI time and does not add 191 * or subtract leapseconds. 192 * 193 * @return psTime: time. 194 */ 195 psTime psJDToTime( 196 double time /** Input time to be converted. */ 197 ); 156 198 157 199 /** Convert timeval to psTime. 158 200 * 159 * Converts timeval time to psTime. The result from this function is in TAI units. 160 * 161 * @return psTime: time in TAI units. 162 */ 163 psTime psTimevalToTime(struct timeval *time); 201 * Converts timeval time to psTime. This function assumes the input time already is in TAI time and does not 202 * add or subtract leapseconds. 203 * 204 * @return psTime: time. 205 */ 206 psTime psTimevalToTime( 207 struct timeval *time /** Input time to be converted. */ 208 ); 164 209 165 210 /** Convert tm time to psTime. 166 211 * 167 * Converts tm time to psTime. The result from this function is in TAI units. 168 * 169 * @return psTime: time in TAI units. 170 */ 171 psTime psTMToTime(struct tm *time); 212 * Converts tm time to psTime. This function assumes the input time already is in TAI time and does not add 213 * or subtract leapseconds. 214 * 215 * @return psTime: time. 216 */ 217 psTime psTMToTime( 218 struct tm *time /** Input time to be converted. */ 219 ); 172 220 /// @} 173 221
Note:
See TracChangeset
for help on using the changeset viewer.
