Changeset 1496 for trunk/psLib/src/astro/psTime.h
- Timestamp:
- Aug 11, 2004, 3:23:20 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psTime.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.h
r1441 r1496 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08- 09 23:40:54$15 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-12 01:23:20 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 /** Definition of psTime. 40 40 * 41 * The psTime struct is used by psLib to represent time values critical to astronomical calculations. This 42 * structure represents a time which is equivalent to TAI (International Atomic Time) and is measured in 43 * both seconds and microseconds. 41 * The psTime struct is used by psLib to represent time values critical to 42 * astronomical calculations. This structure represents a time which is 43 * equivalent to TAI (International Atomic Time) and is measured in both 44 * seconds and microseconds. 44 45 */ 45 46 typedef struct 46 47 { 47 48 time_t tv_sec; /**< Seconds since epoch, Jan 1, 1970. */ 49 50 suseconds_t tv_usec; /**< Microseconds since last second. */ 48 time_t tv_sec; ///< Seconds since epoch, Jan 1, 1970. 49 suseconds_t tv_usec; ///< Microseconds since last second. 51 50 } 52 51 psTime; … … 65 64 */ 66 65 67 psTime psTimeGetTime(void 68 /** No argument. */ 69 ); 66 psTime psTimeGetTime(void); 70 67 71 68 /** Convert psTime to ISO time in TAI units. 72 69 * 73 * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS. This function assumes 74 * the input time already is in TAI time and does not add or subtract leapseconds. 70 * Converts psTime to a null terminated string in the form of: 71 * YYYY/MM/DD,HH:MM:SS.SSS. This function assumes the input time already is 72 * in TAI time and does not add or subtract leapseconds. 75 73 * 76 74 * @return char*: Pointer null terminated array of chars in ISO time. 77 75 */ 78 76 79 char *psTimeToISO( psTime time80 /** Input time to be converted. */81 );77 char *psTimeToISO( 78 psTime time ///< Input time to be converted. 79 ); 82 80 83 81 /** Convert psTime to UTC time. 84 82 * 85 * Converts psTime to UTC time in double precision floating point notation. The input to this must already be 86 * int TAI time. The result from this function is not in TAI units, but that of UTC, which does not contain 87 * leapseconds. 83 * Converts psTime to UTC time in double precision floating point notation. 84 * The input to this must already be int TAI time. The result from this 85 * function is not in TAI units, but that of UTC, which does not contain 86 * leapseconds. 88 87 * 89 88 * @return psTime: UTC time psTime format. 90 89 */ 91 90 92 psTime psTimeToUTC( psTime time93 /** Input time to be converted. */94 );91 psTime psTimeToUTC( 92 psTime time ///< Input time to be converted. 93 ); 95 94 96 95 /** Convert psTime to modified Julian date time. 97 96 * 98 * Converts psTime to modified Julian date (MJD) time. This function assumes the input time already is in TAI 99 * time and does not add or subtract leapseconds. 97 * Converts psTime to modified Julian date (MJD) time. This function assumes 98 * the input time already is in TAI time and does not add or subtract 99 * leapseconds. 100 100 * 101 101 * @return double: Modified Julian Days (MJD) time. 102 102 */ 103 104 double psTimeToMJD(psTime time 105 /** Input time to be converted. */ 106 ); 103 double psTimeToMJD( 104 psTime time ///< Input time to be converted. 105 ); 107 106 108 107 /** Convert psTime to Julian date time. 109 108 * 110 * Converts psTime to Julian date (JD) time. This function assumes the input time already is in TAI time and111 * does not add or subtract leapseconds.109 * Converts psTime to Julian date (JD) time. This function assumes the input 110 * time already is in TAI time and does not add or subtract leapseconds. 112 111 * 113 112 * @return double: Julian Date (JD) time. 114 113 */ 115 116 double psTimeToJD(psTime time 117 /** Input time to be converted. */ 118 ); 114 double psTimeToJD( 115 psTime time ///< Input time to be converted. 116 ); 119 117 120 118 /** Convert psTime to timeval time. 121 119 * 122 * Converts psTime to timeval time. This function assumes the input time already is in TAI time and does not123 * add or subtract leapseconds.120 * Converts psTime to timeval time. This function assumes the input time 121 * already is in TAI time and does not add or subtract leapseconds. 124 122 * 125 123 * @return timeval: timeval struct time. 126 124 */ 127 128 struct timeval psTimeToTimeval(psTime time 129 /** Input time to be converted. */ 130 ); 125 struct timeval psTimeToTimeval( 126 psTime time ///< Input time to be converted. 127 ); 131 128 132 129 /** Convert psTime to tm time. … … 137 134 * @return tm: tm struct time. 138 135 */ 139 140 struct tm *psTimeToTM(psTime time 141 /** Input time to be converted. */ 142 ); 136 struct tm *psTimeToTM( 137 psTime time ///< Input time to be converted. 138 ); 143 139 144 140 /** Convert ISO to psTime. 145 141 * 146 * Converts ISO time to psTime. This function assumes the input time already is in TAI time and does not add147 * or subtract leapseconds.142 * Converts ISO time to psTime. This function assumes the input time already 143 * is in TAI time and does not add or subtract leapseconds. 148 144 * 149 145 * @return psTime: time 150 146 */ 151 152 psTime psISOToTime(char *time 153 /** Input time to be converted. */ 154 ); 147 psTime psISOToTime( 148 char *time ///< Input time to be converted. 149 ); 155 150 156 151 /** Convert UTC to psTime. 157 152 * 158 * Converts UTC time to psTime. This function assumes the input time already is in TAI time and add or159 * subtracts the necessary leapseconds.153 * Converts UTC time to psTime. This function assumes the input time already 154 * is in TAI time and add or subtracts the necessary leapseconds. 160 155 * 161 156 * @return psTime: time in TAI units. 162 157 */ 163 164 psTime psUTCToTime(psTime time 165 /** Input time to be converted. */ 166 ); 158 psTime psUTCToTime( 159 psTime time ///< Input time to be converted. 160 ); 167 161 168 162 /** Convert MJD to psTime. 169 163 * 170 * Converts MJD time to psTime. This function assumes the input time already is in TAI time and does not add 171 * or subtract leapseconds. 172 * 173 * @return psTime: time. 174 */ 175 176 psTime psMJDToTime(double time 177 /** Input time to be converted. */ 178 ); 164 * Converts MJD time to psTime. This function assumes the input time already 165 * is in TAI time and does not add or subtract leapseconds. 166 * 167 * @return psTime: time. 168 */ 169 psTime psMJDToTime( 170 double time ///< Input time to be converted. 171 ); 179 172 180 173 /** Convert JD to psTime. 181 174 * 182 * Converts JD time to psTime. This function assumes the input time already is in TAI time and does not add 183 * or subtract leapseconds. 184 * 185 * @return psTime: time. 186 */ 187 188 psTime psJDToTime(double time 189 /** Input time to be converted. */ 190 ); 175 * Converts JD time to psTime. This function assumes the input time already 176 * is in TAI time and does not add or subtract leapseconds. 177 * 178 * @return psTime: time. 179 */ 180 psTime psJDToTime( 181 double time ///< Input time to be converted. 182 ); 191 183 192 184 /** Convert timeval to psTime. 193 185 * 194 * Converts timeval time to psTime. This function assumes the input time already is in TAI time and does not 195 * add or subtract leapseconds. 196 * 197 * @return psTime: time. 198 */ 199 200 psTime psTimevalToTime(struct timeval *time 201 /** Input time to be converted. */ 202 ); 186 * Converts timeval time to psTime. This function assumes the input time 187 * already is in TAI time and does not add or subtract leapseconds. 188 * 189 * @return psTime: time. 190 */ 191 psTime psTimevalToTime( 192 struct timeval *time ///< Input time to be converted. 193 ); 203 194 204 195 /** Convert tm time to psTime. 205 196 * 206 * Converts tm time to psTime. This function assumes the input time already is in TAI time and does not add 207 * or subtract leapseconds. 208 * 209 * @return psTime: time. 210 */ 211 212 psTime psTMToTime(struct tm *time 213 /** Input time to be converted. */ 214 ); 197 * Converts tm time to psTime. This function assumes the input time already 198 * is in TAI time and does not add or subtract leapseconds. 199 * 200 * @return psTime: time. 201 */ 202 psTime psTMToTime( 203 struct tm *time ///< Input time to be converted. 204 ); 215 205 216 206 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
