LAL  7.5.0.1-ec27e42

Transforms coordinates among various systems. More...

Detailed Description

Transforms coordinates among various systems.

Author
Creighton, T. D.

Usage

SkyCoordinatesTest [-i system lat lon] [-o system] [-z lat lon]
[-a altitude] [-c lat lon rad] [-t sec nsec] [-d debuglevel]
static const INT4 a
Definition: Random.c:79

Description

This program converts between any two celestial coordinate systems, or between geocentric and geodetic terrestrial coordinates, using the routines in Header SkyCoordinates.h. The following option flags are accepted:

  • -i Sets the input coordinate system and coordinate values for a celestial coordinate trasformation: system may be one of horizon, geographic, equatorial, ecliptic, or galactic; lat and lon are the latitude and longitude coordinates in that system (in degrees). If the -i option is not given, then no celestial coordinate transformation will be performed (although a terrestrial coordinate transformation may still occur; see below).
  • -o Sets the output coordinate system for a cellestial coodinate transformation: system may be any of the above. If the -o option is not given, then no celestial coordinate transformation will be performed (although a terrestrial coordinate transformation may still occur; see below).
  • -z Sets the geodetic latitude and longitude of the observer to lat and lon, respectively (in degrees). Either this or the -c option (below) is required for a celestial coordinate transformation involving the horizon system.
  • -a Sets the elevation of the observer above the Earth's reference ellipsoid to altitude (in metres). If given along with the -z option, above, the program will compute and print out the geocentric coordinates of the observer as well.
  • -c Sets the geocentric latitude and longitude of the observer to lat and lon, respectively (in degrees), and the distance from the geocentre to rad (in metres). The program will convert and print out the geodetic coordinates of the observer. Either this or the -z option (below) is required for a celestial coordinate transformation involving the horizon system; if both are given, this option is ignored.
  • -t Sets the GPS time of the conversion to sec seconds plus nsec nanoseconds. The time will be printed in various other formats. This option is required for any transformation between Earth-fixed and sky-fixed coordinate systems.
  • -d Sets the debug level to debuglevel. If not specified, level 0 is assumed.

If no option flags are specified at all, then the routine will randomly generate a sky position in Galactic coordinates, convert it to ecliptic coordinates and back again, and return an error if the result disagrees by more than a milliradian.

Definition in file SkyCoordinatesTest.c.

Go to the source code of this file.

Macros

Error Codes
#define SKYCOORDINATESTESTC_ENORM   0
 Normal exit. More...
 
#define SKYCOORDINATESTESTC_ESUB   1
 Subroutine failed. More...
 
#define SKYCOORDINATESTESTC_EARG   2
 Error parsing arguments. More...
 
#define SKYCOORDINATESTESTC_EMEM   3
 Out of memory. More...
 
#define SKYCOORDINATESTESTC_ETEST   4
 Test case failed. More...
 

Macro Definition Documentation

◆ SKYCOORDINATESTESTC_ENORM

#define SKYCOORDINATESTESTC_ENORM   0

Normal exit.

Definition at line 83 of file SkyCoordinatesTest.c.

◆ SKYCOORDINATESTESTC_ESUB

#define SKYCOORDINATESTESTC_ESUB   1

Subroutine failed.

Definition at line 84 of file SkyCoordinatesTest.c.

◆ SKYCOORDINATESTESTC_EARG

#define SKYCOORDINATESTESTC_EARG   2

Error parsing arguments.

Definition at line 85 of file SkyCoordinatesTest.c.

◆ SKYCOORDINATESTESTC_EMEM

#define SKYCOORDINATESTESTC_EMEM   3

Out of memory.

Definition at line 86 of file SkyCoordinatesTest.c.

◆ SKYCOORDINATESTESTC_ETEST

#define SKYCOORDINATESTESTC_ETEST   4

Test case failed.

Definition at line 87 of file SkyCoordinatesTest.c.