Changeset 251 for trunk/archive/pslib/include/psPosition.h
- Timestamp:
- Mar 17, 2004, 2:53:17 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psPosition.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psPosition.h
r247 r251 7 7 */ 8 8 9 /***********************************************************************************************************/ 9 /*************************************************/ 10 typedef struct { 11 union { 12 double x; //!< x position 13 double r; //!< x position 14 } 15 union { 16 double xErr; //!< Error in x position 17 double rErr; //!< Error in x position 18 } 19 union { 20 double y; //!< y position 21 double d; //!< y position 22 } 23 union { 24 double yErr; //!< Error in y position 25 double dErr; //!< Error in y position 26 } 27 } psCoord; 10 28 11 /** Planets */ 12 typedef enum { 13 PS_MERCURY = 1, 14 PS_VENUS = 2, 15 PS_MARS = 4, 16 PS_JUPITER = 5, 17 PS_SATURN = 6, 18 PS_URANUS = 7, 19 PS_NEPTUNE = 8, 20 PS_PLUTO = 9 21 } psPlanetNum; 29 typedef struct { 30 psDPolynomial4D *x; 31 psDPolynomial4D *y; 32 } psDistortion; 22 33 23 /** Catalogues */ 24 typedef enum { 25 PS_PANSTARRS, //!< Pan-STARRS object catalogue 26 PS_USNO, //!< USNO-B1 catalogue 27 PS_2MASS, //!< 2MASS catalogue 28 PS_TYCHO, //!< Tycho catalogue 29 PS_UCAC2 = 4 //!< UCAC2 catalogue 30 } psCatalogue; 34 typedef struct { 35 psDPolynomial2D *x; 36 psDPolynomial2D *y; 37 } psCoordXform; 31 38 32 /***********************************************************************************************************/ 39 psCoord *psCoordXformApply (psCoordXform *frame, psCoord *coords); 33 40 34 /** A position on an OTA */ 35 typedef struct { 36 int chip; //!< Chip number 37 float x; //!< x position 38 float xErr; //!< Error in x position 39 float y; //!< y position 40 float yErr; //!< Error in y position 41 } psOTAPos; 42 43 /** Constructor */ 44 psOTAPos * 45 psOTAPosAlloc(void); 46 47 /** Destructor */ 48 void 49 psOTAPosFree(psOTAPos *restrict myOTAPos //!< Object to destroy 50 ); 51 52 /***********************************************************************************************************/ 53 54 /** A position on a cell */ 55 typedef psOTAPos psCellPos; //!< Same thing as for an OTA. 56 #define psCellPosAlloc() psOTAPosAlloc() //!< Constructor 57 #define psCellPosFree(C) psOTAPosFree(C) //!< Destructor 58 59 /***********************************************************************************************************/ 60 61 /** An array of detector positions */ 62 typedef struct { 63 psType type; //!< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT! 64 int size; //!< Total number of elements available 65 int n; //!< Number of elements in use 66 psOTAPos *arr; //!< The array data 67 } psOTAPosArray; 68 69 /** Constructor */ 70 psOTAPosArray *psOTAPosArrayAlloc(int s, //!< Total number of elements to make available 71 int n //!< Number of elements that will be used 72 ); 73 /** Reallocator */ 74 psOTAPosArray *psOTAPosArrayRealloc(psOTAPosArray *myArray, //!< Array to reallocate 75 int s //!< Total number of elements to make available 76 ); 77 /** Destructor */ 78 void psOTAPosArrayFree(psOTAPosArray *restrict myArray //!< Array to free 79 ); 80 81 /***********************************************************************************************************/ 82 83 /* 84 * \brief A simple RA/Dec position on the sky, default system is ICRS. Double precision needed for 85 * milli-arcsec. 86 */ 87 typedef struct { 88 double ra; //!< Right Ascension 89 double raErr; //!< Error in RA 90 double dec; //!< Declination 91 double decErr; //!< Error in Dec 92 } psSkyPos; 93 94 /** Constructor */ 95 psSkyPos * 96 psSkyPosAlloc(void); 97 98 /** Destructor */ 99 void 100 psSkyPosFree(psSkyPos *restrict mySkyPos //!< Object to destroy 101 ); 102 103 /***********************************************************************************************************/ 104 105 /** An array of sky positions */ 106 typedef struct { 107 psType type; //!< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT! 108 int size; //!< Total number of elements available 109 int n; //!< Number of elements in use 110 psSkyPos *arr; //!< The array data 111 } psSkyPosArray; 112 113 /** Constructor */ 114 psSkyPosArray *psSkyPosArrayAlloc(int s, //!< Total number of elements to make available 115 int n //!< Number of elements that will be used 116 ); 117 /** Reallocator */ 118 psSkyPosArray *psSkyPosArrayRealloc(psSkyPosArray *myArray, //!< Array to reallocate 119 int s //!< Total number of elements to make available 120 ); 121 /** Destructor */ 122 void psSkyPosArrayFree(psSkyPosArray *restrict myArray //!< Array to free 123 ); 124 125 /***********************************************************************************************************/ 126 127 /** Latitude and Longitude. Double precision needed for milli-arcsec */ 128 typedef struct { 129 double lat; //!< Latitude 130 double latErr; //!< Error in Latitude 131 double lng; //!< Longitude (can't use "long") 132 double lngErr; //!< Error in Longitude 133 } psLatLong; 134 135 /** Constructor */ 136 psLatLong * 137 psLatLongAlloc(void); 138 139 /** Destructor */ 140 void 141 psLatLongFree(psLatLong *restrict myLatLong //!< Object to destroy 142 ); 41 psCoord *psDistortionApply (psCoordXform *frame, psCoord *coords); 143 42 144 43 /***********************************************************************************************************/ … … 147 46 148 47 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */ 149 psSkyPos * 150 psGetOffset(const psSkyPos *restrict position1, //!< Position 1 151 const psSkyPos *restrict position2 //!< Position 2 48 psCoords * 49 psGetOffset(const psCoords *restrict position1, //!< Position 1 50 const psCoords *restrict position2, //!< Position 2 51 char *system 152 52 ); 153 53 154 54 /** Apply an offset to a position */ 155 psSkyPos * 156 psApplyOffset(const psSkyPos *restrict position, //!< Position 157 const psSkyPos *restrict offset //!< Offset 158 ); 55 psCoords * 56 psApplyOffset(const psCoords *restrict position, //!< Position 57 const psCoords *restrict offset, //!< Offset 58 char *system 59 ); 159 60 160 61 /***********************************************************************************************************/ … … 163 64 164 65 /** Get Sun Position */ 165 ps SkyPos *66 psCoords * 166 67 psGetSunPos(float mjd //!< MJD to get position for 167 68 ); 168 69 169 70 /** Get Moon position */ 170 ps SkyPos *71 psCoords * 171 72 psGetMoonPos(float mjd, //!< MJD to get position for 172 73 double latitude, //!< Latitude for apparent position … … 180 81 181 82 /** Get Planet positions */ 182 psSkyPos * 183 psGetPlanetPos(psPlanetNum myPlanetNum, //!< Number for planet 184 float mjd //!< MJD to get position for 185 ); 186 187 /** Get star list from catalogue */ 188 struct psObjectArray * 189 psReadStarCatalogue(double ra, //!< RA of centre of search 190 double dec, //!< Declination of centre of search 191 float radius, //!< Radius of search for stars in catalogue 192 float mjd, //!< The epoch (in MJD) for which to get positions 193 psCatalogue myCatalogue //!< The catalogue to use 83 psCoords * 84 psGetSolarSystemPos(char *solarSystemObject, //!< Named S.S. object 85 float mjd //!< MJD to get position for 194 86 ); 195 87 … … 199 91 200 92 /** Convert ICRS to Ecliptic */ 201 ps LatLong*202 psCoordinatesItoE(const ps SkyPos*restrict coordinates //!< ICRS coordinates to convert93 psCoord * 94 psCoordinatesItoE(const psCoord *restrict coordinates //!< ICRS coordinates to convert 203 95 ); 204 96 205 97 /** Convert Ecliptic to ICRS */ 206 ps SkyPos*207 psCoordinatesEtoI(const ps LatLong*restrict coordinates //!< Ecliptic coordinates to convert98 psCoord * 99 psCoordinatesEtoI(const psCoord *restrict coordinates //!< Ecliptic coordinates to convert 208 100 ); 209 101 210 102 /** Convert ICRS to Galactic */ 211 ps LatLong*212 psCoordinatesItoG(const ps SkyPos*restrict coordinates //!< ICRS coordinates to convert103 psCoord * 104 psCoordinatesItoG(const psCoord *restrict coordinates //!< ICRS coordinates to convert 213 105 ); 214 106 215 107 /** Convert Galactic to ICRS */ 216 ps SkyPos*217 psCoordinatesGtoI(const ps LatLong*restrict coordinates //!< Galactic coordinates to convert108 psCoord * 109 psCoordinatesGtoI(const psCoord *restrict coordinates //!< Galactic coordinates to convert 218 110 ); 219 111
Note:
See TracChangeset
for help on using the changeset viewer.
