Changeset 4051 for trunk/psLib/src/astronomy/psTime.h
- Timestamp:
- May 31, 2005, 11:48:13 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psTime.h (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psTime.h
r3713 r4051 1 1 /** @file psTime.h 2 2 * 3 * @brief Definitions for time, time utilities, and conversion functions for use with psLib astronomy 4 * functions. 5 * 6 * A collection of functions are required by psLib to manipulate time data. These functions primarily consist 7 * of conversions between specific time formats. They use the UNIX timeval time system as the 8 * base upon which International Atomic Time (TAI) and Universal Time Coordinated (UTC) are calculated. 3 * @brief Definitions for time, time utilities, and conversion functions for use 4 * with psLib astronomy functions. 5 * 6 * A collection of functions are required by psLib to manipulate time data. These 7 * functions primarily consist of conversions between specific time formats. They 8 * use the UNIX timeval time system as the base upon which International Atomic 9 * Time (TAI) and Universal Time Coordinated (UTC) are calculated. 9 10 * 10 11 * @author Ross Harman, MHPCC 11 12 * 12 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 4-19 02:44:12$13 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-05-31 21:47:46 $ 14 15 * 15 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 16 17 */ 17 18 18 19 19 #ifndef PSTIME_H … … 88 88 /** Allocate time struct. 89 89 * 90 * Allocates an empty time struct. User must specify the psTimeType (PS_TIME_TAI or PS_TIME_UTC) in the argument. 91 * The seconds and microseconds members of the struct are set to zero. 90 * Allocates an empty time struct. User must specify the psTimeType 91 * (PS_TIME_TAI or PS_TIME_UTC) in the argument. The seconds and microseconds members 92 * of the struct are set to zero. 92 93 * 93 94 * @return psTime*: Struct with empty time. … … 99 100 /** Get current time. 100 101 * 101 * Gets current time from the system clock. User must specify the psTimeType (PS_TIME_TAI or PS_TIME_UTC) in102 * the argument.102 * Gets current time from the system clock. User must specify the psTimeType 103 * (PS_TIME_TAI or PS_TIME_UTC) in the argument. 103 104 * 104 105 * @return psTime*: Struct with current time. … … 121 122 /** Convert psTime to Local Mean Sidereal Time (LMST). 122 123 * 123 * Converts psTime at the given longitude to LMST time. If the input time is not in UTC format, then it is124 * converted.125 * 126 * @return double: LST Time.127 */ 128 doublepsTimeToLMST(124 * Converts psTime at the given longitude to LMST time. If the input time is not 125 * in UTC format, then it is converted. 126 * 127 * @return psF64: LST Time. 128 */ 129 psF64 psTimeToLMST( 129 130 psTime *time, ///< psTime to be converted. 130 doublelongitude ///< Longitude.131 psF64 longitude ///< Longitude. 131 132 ); 132 133 … … 135 136 * This function is necessary to for various SLALIB functions. 136 137 * 137 * @return double: Time difference. 138 */ 139 double psTimeGetUT1Delta( 138 * @return psF64: Time difference. 139 */ 140 psF64 psTimeGetUT1Delta( 141 const psTime *time, ///< psTime to be looked up. 142 psTimeBulletin bulletin ///< IERS bulletin to use 143 ); 144 145 /** Determine TAI - UTC from table lookup. 146 * 147 * This function is necessary to for various psTime functions. 148 * 149 * @return psF64: Time difference. 150 */ 151 psF64 p_psTimeGetTAIDelta( 140 152 const psTime *time ///< psTime to be looked up. 141 153 ); 142 154 143 /** Determine TAI - UTC from table lookup.144 *145 * This function is necessary to for various psTime functions.146 *147 * @return double: Time difference.148 */149 double psTimeGetTAIDelta(150 const psTime *time ///< psTime to be looked up.151 );152 153 155 /** Determine polar coordinates at a given time. 154 156 * … … 157 159 * @return psSphere*: Spherical coordinates of Earth's polar axias. 158 160 */ 159 struct psSphere* p sTimeGetPoleCoords(160 const psTime *time ///< psTime determine polar orientation.161 struct psSphere* p_psTimeGetPoleCoords( 162 const psTime *time ///< psTime determine polar orientation. 161 163 ); 162 164 … … 172 174 ); 173 175 176 /** Determine if UTC time is a leapsecond. 177 * 178 * Determines if the specified UTC time is a valid leapsecond. 179 * 180 * @return psBool: valid leap second 181 */ 182 psBool psTimeIsLeapSecond( 183 const psTime* utc ///< UTC to verify if leap second 184 ); 185 174 186 /** Convert psTime to Julian date time. 175 187 * 176 * Converts psTime to Julian date (JD) time. This function does not add or subtract leapseconds. 177 * 178 * @return double: Julian Date (JD) time. 179 */ 180 double psTimeToJD( 188 * Converts psTime to Julian date (JD) time. This function does not add or 189 * subtract leapseconds. 190 * 191 * @return psF64: Julian Date (JD) time. 192 */ 193 psF64 psTimeToJD( 181 194 const psTime* time ///< Input time to be converted. 182 195 ); 183 196 /** Convert psTime to modified Julian date time. 184 197 * 185 * Converts psTime to modified Julian date (MJD) time. This function does not add or subtract leapseconds. 186 * 187 * @return double: Modified Julian Days (MJD) time. 188 */ 189 double psTimeToMJD( 198 * Converts psTime to modified Julian date (MJD) time. This function does not 199 * add or subtract leapseconds. 200 * 201 * @return psF64: Modified Julian Days (MJD) time. 202 */ 203 psF64 psTimeToMJD( 190 204 const psTime* time ///< Input time to be converted. 191 205 ); … … 193 207 /** Convert psTime to ISO8601 formatted string. 194 208 * 195 * Converts psTime to a null terminated string in the form of YYYY-MM-DDThh:mm:ss.sss. This function does not196 * add or subtract leapseconds.209 * Converts psTime to a null terminated string in the form of YYYY-MM-DDThh:mm:ss.sss. 210 * This function does not add or subtract leapseconds. 197 211 * 198 212 * @return char*: Pointer null terminated array of chars in ISO time. … … 206 220 * Converts psTime to timeval time. This function does not add or subtract leapseconds. 207 221 * 208 * @return timeval : timeval struct time.209 */ 210 struct timeval psTimeToTimeval(211 const psTime* time ///< Input time to be converted.222 * @return timeval*: timeval struct time. 223 */ 224 struct timeval* psTimeToTimeval( 225 const psTime* time ///< Input time to be converted. 212 226 ); 213 227 214 /** Convert psTime to tm time. 215 * 216 * Converts psTime to tm time. This function is based on a Perl algorithm availble in the Pan-STARRS Image 217 * processing Algorithm Design Description (ADD). This function does not add or subtract leapseconds. 228 /* 229 * Convert psTime to tm time. 230 * 231 * Converts psTime to tm time. This function is based on a Perl algorithm availble 232 * in the Pan-STARRS Image processing Algorithm Design Description (ADD). This function 233 * does not add or subtract leapseconds. 218 234 * 219 235 * @return tm: tm struct time. 220 * /221 struct tm* p sTimeToTM(222 const psTime *time ///< Input time to be converted.236 * 237 struct tm* p_psTimeToTM( 238 const psTime *time ///< Input time to be converted. 223 239 ); 224 240 */ 225 241 /** Convert JD to psTime. 226 242 * … … 230 246 */ 231 247 psTime* psTimeFromJD( 232 double time///< Input time to be converted.248 psF64 time ///< Input time to be converted. 233 249 ); 234 250 … … 240 256 */ 241 257 psTime* psTimeFromMJD( 242 double time///< Input time to be converted.258 psF64 time ///< Input time to be converted. 243 259 ); 244 260 … … 250 266 */ 251 267 psTime* psTimeFromISO( 252 const char* time ///< Input time to be converted.268 const char* time ///< Input time to be converted. 253 269 ); 254 270 … … 260 276 */ 261 277 psTime* psTimeFromTimeval( 262 const struct timeval *time ///< Input time to be converted. 278 const struct timeval *time ///< Input time to be converted. 279 ); 280 281 /** Convert Terrestrial Time to psTime 282 * 283 * Converts Terrestial Time to psTime. This function assumes resultant time is of type TT. 284 * 285 * @return psTime*: time (TT) 286 */ 287 psTime* psTimeFromTT( 288 psS64 sec, ///< Input terrestrial time in seconds 289 psU32 nsec ///< Input terrestrial time fraction of seconds (nanoseconds) 290 ); 291 292 /** Convert UTC time to psTime 293 * 294 * Converts UTC time to psTime. It will verify if time specified is a leapsecond. 295 * 296 * @return psTime*: time (UTC) 297 */ 298 psTime* psTimeFromUTC( 299 psS64 sec, ///< Input time in seconds 300 psU32 nsec, ///< Input time fraction of seconds (nanoseconds) 301 psBool leapsecond ///< Input time is a leapsecond 263 302 ); 264 303 265 304 /** Convert tm time to psTime. 266 305 * 267 * Converts tm time to psTime. This function is based on a Perl algorithm availble in the Pan-STARRS Image 268 * processing Algorithm Design Description (ADD). This function does not add or subtract leapseconds. 306 * Converts tm time to psTime. This function is based on a Perl algorithm availble 307 * in the Pan-STARRS Image processing Algorithm Design Description (ADD). This function 308 * does not add or subtract leapseconds. 269 309 * 270 310 * @return psTime*: time. 271 311 */ 272 psTime* p sTimeFromTM(273 const struct tm *time ///< Input time to be converted.312 psTime* p_psTimeFromTM( 313 const struct tm *time ///< Input time to be converted. 274 314 ); 275 315 … … 281 321 */ 282 322 psTime* psTimeMath( 283 const psTime *time, ///< Time.284 psF64 delta ///< Time delta.323 const psTime *time, ///< Time. 324 psF64 delta ///< Time delta. 285 325 ); 286 326 … … 292 332 */ 293 333 psF64 psTimeDelta( 294 const psTime *time1, ///< First time.295 const psTime *time2 ///< Second time.334 const psTime *time1, ///< First time. 335 const psTime *time2 ///< Second time. 296 336 ); 297 337
Note:
See TracChangeset
for help on using the changeset viewer.
