00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _SKYCOORDINATES_H
00029 #define _SKYCOORDINATES_H
00030
00031 #include <lal/LALStdlib.h>
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037 NRCSID( SKYCOORDINATESH, "$Id: SkyCoordinates.h,v 1.19 2007/06/08 14:41:47 bema Exp $" );
00038
00039
00040
00041 #define SKYCOORDINATESH_ENUL 1
00042 #define SKYCOORDINATESH_ESYS 2
00043 #define SKYCOORDINATESH_EZERO 3
00044 #define SKYCOORDINATESH_ESING 4
00045
00046 #define SKYCOORDINATESH_MSGENUL "Unexpected null pointer in arguments"
00047 #define SKYCOORDINATESH_MSGESYS "Wrong coordinate system in input"
00048 #define SKYCOORDINATESH_MSGEZERO "Angular coordinates undefined at origin"
00049 #define SKYCOORDINATESH_MSGESING "Point is inside singular ellipsoid"
00050
00051
00052
00053
00054
00055
00056 typedef enum {
00057 COORDINATESYSTEM_HORIZON,
00058 COORDINATESYSTEM_GEOGRAPHIC,
00059 COORDINATESYSTEM_EQUATORIAL,
00060 COORDINATESYSTEM_ECLIPTIC,
00061 COORDINATESYSTEM_GALACTIC
00062 } CoordinateSystem;
00063
00064
00065
00066
00067
00068
00069 typedef struct tagSkyPosition {
00070 REAL8 longitude;
00071 REAL8 latitude;
00072 CoordinateSystem system;
00073 } SkyPosition;
00074
00075
00076
00077
00078
00079 typedef struct tagEarthPosition {
00080 SkyPosition geodetic;
00081
00082
00083
00084 REAL8 elevation;
00085
00086
00087 REAL8 x, y, z;
00088
00089
00090 REAL8 radius;
00091
00092 SkyPosition geocentric;
00093
00094
00095 } EarthPosition;
00096
00097
00098
00099
00100 typedef struct tagConvertSkyParams {
00101 CoordinateSystem system;
00102
00103 SkyPosition *zenith;
00104
00105
00106
00107 LIGOTimeGPS *gpsTime;
00108
00109
00110
00111
00112 } ConvertSkyParams;
00113
00114
00115
00116
00117 void
00118 LALGalacticToEquatorial( LALStatus *,
00119 SkyPosition *output,
00120 SkyPosition *input );
00121
00122 void
00123 LALEquatorialToGalactic( LALStatus *,
00124 SkyPosition *output,
00125 SkyPosition *input );
00126
00127 void
00128 LALEclipticToEquatorial( LALStatus *,
00129 SkyPosition *output,
00130 SkyPosition *input );
00131
00132 void
00133 LALEquatorialToEcliptic( LALStatus *,
00134 SkyPosition *output,
00135 SkyPosition *input );
00136
00137 void
00138 LALGeographicToEquatorial( LALStatus *,
00139 SkyPosition *output,
00140 SkyPosition *input,
00141 LIGOTimeGPS *gpsTime );
00142
00143 void
00144 LALEquatorialToGeographic( LALStatus *,
00145 SkyPosition *output,
00146 SkyPosition *input,
00147 LIGOTimeGPS *gpsTime );
00148
00149 void
00150 LALSystemToHorizon( LALStatus *,
00151 SkyPosition *output,
00152 SkyPosition *input,
00153 const SkyPosition *zenith );
00154
00155 void
00156 LALHorizonToSystem( LALStatus *,
00157 SkyPosition *output,
00158 SkyPosition *input,
00159 const SkyPosition *zenith );
00160
00161 void
00162 LALGeodeticToGeocentric( LALStatus *, EarthPosition *location );
00163
00164 void
00165 LALGeocentricToGeodetic( LALStatus *, EarthPosition *location );
00166
00167 void
00168 LALConvertSkyCoordinates( LALStatus *,
00169 SkyPosition *output,
00170 SkyPosition *input,
00171 ConvertSkyParams *params );
00172
00173 void LALNormalizeSkyPosition (LALStatus *status, SkyPosition *posOut, const SkyPosition *posIn);
00174 int XLALNormalizeSkyPosition ( SkyPosition *posInOut );
00175
00176 #ifdef __cplusplus
00177 }
00178 #endif
00179
00180 #endif