Changeset 1374 for trunk/psLib/src/astro/psCoord.h
- Timestamp:
- Aug 3, 2004, 2:55:17 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.h
r1325 r1374 1 1 /** @file psCoord.h 2 *3 * @brief Contains basic coordinate transformation definitions and operations4 *5 * This file defines the basic types for astronomical coordinate6 * transformation7 *8 * @ingroup AstroImage 9 *10 * @author George Gusciora, MHPCC11 *12 * @version $Revision: 1.6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-29 02:08:02$14 *15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii16 */2 * 3 * @brief Contains basic coordinate transformation definitions and operations 4 * 5 * This file defines the basic types for astronomical coordinate 6 * transformation 7 * 8 * @ingroup CoordinateTransform 9 * 10 * @author George Gusciora, MHPCC 11 * 12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-04 00:55:17 $ 14 * 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 16 */ 17 17 18 18 # ifndef PS_COORD_H … … 26 26 #include "psTime.h" 27 27 28 /// @addtogroup CoordinateTransform 29 /// @{ 30 28 31 typedef struct 29 {30 double x; ///< x position31 double y; ///< y position32 double xErr; ///< Error in x position33 double yErr; ///< Error in y position34 }32 { 33 double x; ///< x position 34 double y; ///< y position 35 double xErr; ///< Error in x position 36 double yErr; ///< Error in y position 37 } 35 38 psPlane; 36 39 37 40 typedef struct 38 {39 double r; ///< RA40 double d; ///< Dec41 double rErr; ///< Error in RA42 double dErr; ///< Error in Dec43 }41 { 42 double r; ///< RA 43 double d; ///< Dec 44 double rErr; ///< Error in RA 45 double dErr; ///< Error in Dec 46 } 44 47 psSphere; 45 48 46 49 typedef struct 47 {48 psDPolynomial2D *x;49 psDPolynomial2D *y;50 }50 { 51 psDPolynomial2D *x; 52 psDPolynomial2D *y; 53 } 51 54 psPlaneTransform; 52 55 53 56 typedef struct 54 {55 psDPolynomial4D *x;56 psDPolynomial4D *y;57 }57 { 58 psDPolynomial4D *x; 59 psDPolynomial4D *y; 60 } 58 61 psPlaneDistort; 59 62 60 63 typedef struct 61 {62 double sinPhi; ///< sin of North Pole lattitude63 double cosPhi; ///< cos of North Pole lattitude64 double Xo; ///< First PT of Ares lon65 double xo; ///< First PT of Ares equiv lon66 }64 { 65 double sinPhi; ///< sin of North Pole lattitude 66 double cosPhi; ///< cos of North Pole lattitude 67 double Xo; ///< First PT of Ares lon 68 double xo; ///< First PT of Ares equiv lon 69 } 67 70 psSphereTransform; 68 71 69 72 typedef enum { 70 PS_PROJ_TAN, ///< Tangent projection71 PS_PROJ_SIN, ///< Sine projection72 PS_PROJ_AIT, ///< Aitoff projection73 PS_PROJ_PAR, ///< Par projection74 PS_PROJ_GLS, ///< GLS projection75 PS_PROJ_CAR, ///< CAR projection76 PS_PROJ_MER, ///< MER projection73 PS_PROJ_TAN, ///< Tangent projection 74 PS_PROJ_SIN, ///< Sine projection 75 PS_PROJ_AIT, ///< Aitoff projection 76 PS_PROJ_PAR, ///< Par projection 77 PS_PROJ_GLS, ///< GLS projection 78 PS_PROJ_CAR, ///< CAR projection 79 PS_PROJ_MER, ///< MER projection 77 80 PS_PROJ_NTYPE ///< Number of types; must be last. 78 81 } psProjectionType; 79 82 80 83 typedef struct 81 {82 double R; ///< Coordinates of projection center83 double D; ///< Coordinates of projection center84 double Xs; ///< plate-scale in X direction85 double Ys; ///< plate-scale in Y direction86 psProjectionType type; ///< Projection type87 }84 { 85 double R; ///< Coordinates of projection center 86 double D; ///< Coordinates of projection center 87 double Xs; ///< plate-scale in X direction 88 double Ys; ///< plate-scale in Y direction 89 psProjectionType type; ///< Projection type 90 } 88 91 psProjection; 89 92 … … 100 103 } psSphereOffsetUnit; 101 104 102 psPlane *psPlaneTransformApply(psPlane *out, 103 const psPlaneTransform *transform, 104 const psPlane *coords); 105 psPlane *psPlaneTransformApply( psPlane *out, 106 const psPlaneTransform *transform, 107 const psPlane *coords ); 108 109 psPlane *psPlaneDistortApply( psPlane *out, 110 const psPlaneDistort *transform, 111 const psPlane *coords, 112 float term3, 113 float term4 ); 114 115 116 // New function prototype. 117 psSphereTransform *psSphereTransformAlloc( double NPlat, 118 double Xo, 119 double xo ); 120 121 void p_psSphereTransformFree( psSphereTransform *trans ); 105 122 106 psPlane *psPlaneDistortApply(psPlane *out, 107 const psPlaneDistort *transform, 108 const psPlane *coords, 109 float term3, 110 float term4); 123 psSphere *psSphereTransformApply( psSphere *out, 124 const psSphereTransform *transform, 125 const psSphere *coord ); 126 127 psSphereTransform *psSphereTransformICRStoEcliptic( psTime time ); 128 psSphereTransform *psSphereTransformEcliptictoICRS( psTime time ); 129 psSphereTransform *psSphereTransformICRStoGalatic( void ); 130 psSphereTransform *psSphereTransformGalatictoICRS( void ); 111 131 112 113 // New function prototype. 114 psSphereTransform *psSphereTransformAlloc(double NPlat, 115 double Xo, 116 double xo); 117 118 void p_psSphereTransformFree(psSphereTransform *trans); 119 120 psSphere *psSphereTransformApply(psSphere *out, 121 const psSphereTransform *transform, 122 const psSphere *coord); 123 124 psSphereTransform *psSphereTransformICRStoEcliptic(psTime time); 125 psSphereTransform *psSphereTransformEcliptictoICRS(psTime time); 126 psSphereTransform *psSphereTransformICRStoGalatic(void); 127 psSphereTransform *psSphereTransformGalatictoICRS(void); 128 129 psPlane *psProject(const psSphere *coord, 130 const psProjection *projection); 131 132 psSphere *psDeproject(const psPlane *coord, 133 const psProjection *projection); 134 135 psSphere *psSphereGetOffset(const psSphere *restrict position1, 136 const psSphere *restrict position2, 137 psSphereOffsetMode mode, 138 psSphereOffsetUnit unit); 139 140 psSphere *psSphereSetOffset(const psSphere *restrict position, 141 const psSphere *restrict offset, 142 psSphereOffsetMode mode, 143 psSphereOffsetUnit unit); 144 132 psPlane *psProject( const psSphere *coord, 133 const psProjection *projection ); 134 135 psSphere *psDeproject( const psPlane *coord, 136 const psProjection *projection ); 137 138 psSphere *psSphereGetOffset( const psSphere *restrict position1, 139 const psSphere *restrict position2, 140 psSphereOffsetMode mode, 141 psSphereOffsetUnit unit ); 142 143 psSphere *psSphereSetOffset( const psSphere *restrict position, 144 const psSphere *restrict offset, 145 psSphereOffsetMode mode, 146 psSphereOffsetUnit unit ); 147 148 /// @} 145 149 146 150 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
