Changeset 4620 for trunk/psLib/src/astro/psCoord.h
- Timestamp:
- Jul 27, 2005, 9:55:16 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.h
r4613 r4620 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-07-27 00:36:01$12 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-27 19:55:15 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 112 112 } 113 113 psPlaneDistort; 114 115 /** Spherical Transform Definition116 *117 * We need to be able to convert between ICRS, Galactic and Ecliptic118 * coordinates, and potentially between arbitrary spherical coordinate119 * systems. All of these basic spherical transformations represent rotations120 * of the spherical coordinate reference. We specify a general121 * transformation function which takes a structure, psSphereTransform,122 * defining the transformation between two spherical coordinate systems123 *124 */125 typedef struct126 {127 double alphaP; ///< Longitude of the target system pole in the source system128 double cosDeltaP; ///< Cosine of target pole latitude in the source system129 double sinDeltaP; ///< Sine of target pole latitude in the source system130 double phiP; ///< Longitude of the ascending node in the target system131 }132 psSphereTransform;133 114 134 115 /** Projection type for projection/deprojection … … 163 144 psProjection; 164 145 165 /** Mode for Offset calculation between two sky positions166 *167 * @see psSphereGetOffset, psSphereSetOffset168 *169 */170 typedef enum {171 PS_SPHERICAL, ///< offset corresponds to an angular offset172 PS_LINEAR ///< offset corresponds to a linear offset173 } psSphereOffsetMode;174 175 /** The units of the offset176 *177 * @see psSphereGetOffset, psSphereSetOffset178 *179 */180 typedef enum {181 PS_ARCSEC, ///< Arcseconds182 PS_ARCMIN, ///< Arcminutes183 PS_DEGREE, ///< Degrees184 PS_RADIAN ///< Radians185 } psSphereOffsetUnit;186 187 146 /** Allocates a psPlane 188 147 * 189 148 * @return psPlane* resulting plane structure. 190 149 */ 191 192 150 psPlane* psPlaneAlloc(void); 193 151 … … 196 154 * @return psSphere* resulting sphere structure. 197 155 */ 198 199 156 psSphere* psSphereAlloc(void); 157 158 /** Allocates a psCube 159 * 160 * @return psCube* resulting cubic structure. 161 */ 162 psCube* psCubeAlloc(void); 200 163 201 164 /** Allocates a psCube … … 250 213 ); 251 214 252 /** Allocator for psSphereTransform253 *254 * @return psSphereTransform* newly allocated struct255 */256 257 psSphereTransform* psSphereTransformAlloc(258 double alphaP, ///< north pole latitude259 double deltaP, ///< north pole longitude?260 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).261 );262 263 /** Applies the psSphereTransform transform for a specified coordinate264 *265 * @return psSphere* resulting coordinate based on transform266 */267 psSphere* psSphereTransformApply(268 psSphere* out, ///< a psSphere to recycle. If NULL, a new one is generated.269 const psSphereTransform* transform,///< the transform to apply270 const psSphere* coord ///< the coordinate to apply the transform above.x271 );272 273 /** Creates the appropriate transform for converting from ICRS to Ecliptic274 * coordinate systems.275 *276 * @return psSphereTransform* transform for ICRS->Ecliptic coordinate systems277 */278 psSphereTransform* psSphereTransformICRSToEcliptic(279 psTime *time ///< the time for which the resulting transform will be valid280 );281 282 /** Creates the appropriate transform for converting from Ecliptic to ICRS283 * coordinate systems.284 *285 * @return psSphereTransform* transform for Ecliptic->ICRS coordinate systems286 */287 psSphereTransform* psSphereTransformEclipticToICRS(288 psTime *time ///< the time for which the resulting transform will be valid289 );290 291 /** Creates the appropriate transform for converting from ICRS to Galactic292 * coordinate systems.293 *294 */295 psSphereTransform* psSphereTransformICRSToGalactic(void);296 297 /** Creates the appropriate transform for converting from Galactic to ICRS298 * coordinate systems.299 *300 */301 psSphereTransform* psSphereTransformGalacticToICRS(void);302 303 215 /** Allocates memory for a psProjection structure 304 216 * … … 329 241 const psPlane* coord, ///< coordinate to project 330 242 const psProjection* projection ///< parameters of the projection 331 );332 333 /** Determines the offset (RA,Dec) on the sky between two positions.334 *335 * Both an offset mode and an offset unit may be defined. The mode may be336 * either PS_SPHERICAL, in which case the specified offset corresponds to an337 * offset in angles, or it may be PS_LINEAR, in which case the offset338 * corresponds to a linear offset in a local projection. The offset unit may339 * be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which340 * specifies the units of the offset only.341 *342 * @return psSphere* the offset between position1 and position2343 */344 psSphere* psSphereGetOffset(345 const psSphere* position1, ///< first position for calculating offset346 const psSphere* position2, ///< second position for calculating offset347 psSphereOffsetMode mode, ///< type of offset can be PS_SPHERICAL or PS_LINEAR348 psSphereOffsetUnit unit ///< specifies the units of offset only349 );350 351 /** Applies the given offset to a coordinate.352 *353 * Both an offset mode and an offset unit may be defined. The mode may be354 * either PS_SPHERICAL, in which case the specified offset corresponds to an355 * offset in angles, or it may be PS_LINEAR, in which case the offset356 * corresponds to a linear offset in a local projection. The offset unit may357 * be in one of PS_ARCSEC, PS_ARCMIN, PS_DEGREE, and PS_RADIAN, which358 * specifies the units of the offset only.359 *360 * @return psSphere* the original position with the given offset applied.361 */362 psSphere* psSphereSetOffset(363 const psSphere* position, ///< coordinate of origin364 const psSphere* offset, ///< coordinate of offset to apply365 psSphereOffsetMode mode, ///< corresponds to an offset in angles or local projection366 psSphereOffsetUnit unit ///< specifies the units of offset only367 );368 369 /** Generates the complete spherical rotation to account for precession370 * between two times. The equinoxes shall be Julian equinoxes.371 *372 * @return psSphere* the resulting spherical rotation373 */374 psSphere* psSpherePrecess(375 psSphere *coords, ///< coordinates (modified in-place)376 const psTime *fromTime, ///< equinox of coords input377 const psTime *toTime ///< equinox of coords output378 243 ); 379 244
Note:
See TracChangeset
for help on using the changeset viewer.
