Changeset 1496 for trunk/psLib/src/astro
- Timestamp:
- Aug 11, 2004, 3:23:20 PM (22 years ago)
- Location:
- trunk/psLib/src/astro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.h
r1441 r1496 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08- 09 23:40:54$13 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-12 01:23:20 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 117 117 /** Projection type for projection/deprojection 118 118 * 119 * @see alsopsProject, psDeproject119 * @see psProject, psDeproject 120 120 * 121 121 */ … … 133 133 /** Parameter set for projection/deprojection 134 134 * 135 * @see alsopsProject, psDeproject135 * @see psProject, psDeproject 136 136 * 137 137 */ … … 148 148 /** Mode for Offset calculation between two sky positions 149 149 * 150 * @see alsopsSphereGetOffset, psSphereSetOffset150 * @see psSphereGetOffset, psSphereSetOffset 151 151 * 152 152 */ … … 158 158 /** The units of the offset 159 159 * 160 * @see alsopsSphereGetOffset, psSphereSetOffset160 * @see psSphereGetOffset, psSphereSetOffset 161 161 * 162 162 */ … … 170 170 /** Applies the psPlaneTransform transform to a specified coordinate 171 171 * 172 */ 173 psPlane* psPlaneTransformApply(psPlane* out, ///< a psPlane to recycle. If NULL, a new one is generated. 174 const psPlaneTransform* transform, ///< the transform to apply 175 const psPlane* coords ///< the coordinate to apply the transform above. 176 ); 172 * @return psPlane* resulting coordinate based on transform 173 */ 174 psPlane* psPlaneTransformApply( 175 psPlane* out, ///< a psPlane to recycle. If NULL, a new one is generated. 176 const psPlaneTransform* transform, ///< the transform to apply 177 const psPlane* coords ///< the coordinate to apply the transform above. 178 ); 177 179 178 180 /** Applies the psPlaneDistort transform to a specified coordinate 179 181 * 180 */ 181 psPlane* psPlaneDistortApply(psPlane* out, ///< a psPlane to recycle. If NULL, a new one is generated. 182 const psPlaneDistort* transform, ///< the transform to apply 183 const psPlane* coords, ///< the coordinate to apply the transform above. 184 float term3, ///< third term -- maybe magnitude 185 float term4 ///< forth term -- maybe color 186 ); 182 * @return psPlane* resulting coordinate based on transform 183 */ 184 psPlane* psPlaneDistortApply( 185 psPlane* out, ///< a psPlane to recycle. If NULL, a new one is generated. 186 const psPlaneDistort* transform, ///< the transform to apply 187 const psPlane* coords, ///< the coordinate to apply the transform above. 188 float term3, ///< third term -- maybe magnitude 189 float term4 ///< forth term -- maybe color 190 ); 187 191 188 192 /** Allocator for psSphereTransform 189 193 * 190 */ 191 psSphereTransform* psSphereTransformAlloc(double NPlat, ///< north pole latitude 192 double Xo, ///< First PT of Ares lon 193 double xo ///< First PT of Ares equiv lon 194 ); 194 * @return psSphereTransform* newly allocated struct 195 */ 196 psSphereTransform* psSphereTransformAlloc( 197 double NPlat, ///< north pole latitude 198 double Xo, ///< First PT of Ares lon 199 double xo ///< First PT of Ares equiv lon 200 ); 195 201 196 202 /** Applies the psSphereTransform transform for a specified coordinate 197 203 * 198 */ 199 psSphere* psSphereTransformApply(psSphere* out, ///< a psSphere to recycle. If NULL, a new one is 200 // generated. 201 const psSphereTransform* transform, ///< the transform to apply 202 const psSphere* coord ///< the coordinate to apply the transform above.x 203 ); 204 205 psSphereTransform* psSphereTransformICRStoEcliptic(psTime time); 206 207 psSphereTransform* psSphereTransformEcliptictoICRS(psTime time); 208 204 * @return psSphere* resulting coordinate based on transform 205 */ 206 psSphere* psSphereTransformApply( 207 psSphere* out, ///< a psSphere to recycle. If NULL, a new one is generated. 208 const psSphereTransform* transform,///< the transform to apply 209 const psSphere* coord ///< the coordinate to apply the transform above.x 210 ); 211 212 /** Creates the appropriate transform for converting from ICRS to Ecliptic 213 * coordinate systems. 214 * 215 * @return psSphereTransform* transform for ICRS->Ecliptic coordinate systems 216 */ 217 psSphereTransform* psSphereTransformICRStoEcliptic( 218 psTime time ///< the time for which the resulting transform will be valid 219 ); 220 221 /** Creates the appropriate transform for converting from Ecliptic to ICRS 222 * coordinate systems. 223 * 224 * @return psSphereTransform* transform for Ecliptic->ICRS coordinate systems 225 */ 226 psSphereTransform* psSphereTransformEcliptictoICRS( 227 psTime time ///< the time for which the resulting transform will be valid 228 ); 229 230 /** Creates the appropriate transform for converting from ICRS to Galatic 231 * coordinate systems. 232 * 233 */ 209 234 psSphereTransform* psSphereTransformICRStoGalatic(void); 210 235 236 /** Creates the appropriate transform for converting from Galatic to ICRS 237 * coordinate systems. 238 * 239 */ 211 240 psSphereTransform* psSphereTransformGalatictoICRS(void); 212 241 213 psPlane* psProject(const psSphere* coord, const psProjection* projection); 214 215 psSphere* psDeproject(const psPlane* coord, const psProjection* projection); 216 217 psSphere* psSphereGetOffset(const psSphere* restrict position1, 218 const psSphere* restrict position2, 219 psSphereOffsetMode mode, psSphereOffsetUnit unit); 220 221 psSphere* psSphereSetOffset(const psSphere* restrict position, 222 const psSphere* restrict offset, 223 psSphereOffsetMode mode, psSphereOffsetUnit unit); 242 /** Projects a spherical coordinate to a linear coordinate system 243 * 244 * @return psPlane* projected coordinate 245 */ 246 psPlane* psProject( 247 const psSphere* coord, ///< coordinate to project 248 const psProjection* projection ///< parameters of the projection 249 ); 250 251 /** Reverse projection of a linear coordinate to a spherical coordinate system 252 * 253 * @return psPlane* projected coordinate 254 */ 255 psSphere* psDeproject( 256 const psPlane* coord, ///< coordinate to project 257 const psProjection* projection ///< parameters of the projection 258 ); 259 260 /** Determines the offset (RA,Dec) on the sky between two positions. 261 * 262 * Both an offset mode and an offset unit may be defined. The mode may be 263 * either PS_SPHERICAL, in which case the specified offset corresponds to an 264 * offset in angles, or it may be PS_LINEAR, in which case the offset 265 * corresponds to a linear offset in a local projection. The offset unit may 266 * be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which 267 * specifies the units of the offset only. 268 * 269 * @return psSphere* the offset between position1 and position2 270 */ 271 psSphere* psSphereGetOffset( 272 const psSphere* restrict position1, 273 const psSphere* restrict position2, 274 psSphereOffsetMode mode, 275 psSphereOffsetUnit unit 276 ); 277 278 /** Applies the given offset to a coordinate. 279 * 280 * Both an offset mode and an offset unit may be defined. The mode may be 281 * either PS_SPHERICAL, in which case the specified offset corresponds to an 282 * offset in angles, or it may be PS_LINEAR, in which case the offset 283 * corresponds to a linear offset in a local projection. The offset unit may 284 * be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which 285 * specifies the units of the offset only. 286 * 287 * @return psSphere* the given position with the given offset applied. 288 */ 289 psSphere* psSphereSetOffset( 290 const psSphere* restrict position, 291 const psSphere* restrict offset, 292 psSphereOffsetMode mode, 293 psSphereOffsetUnit unit 294 ); 224 295 225 296 /// @} -
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.
