SOFA
20200721
|
Functions | |
int | iauGc2gd (int n, double xyz[3], double *elong, double *phi, double *height) |
Transform geocentric coordinates to geodetic. More... | |
int | iauGd2gc (int n, double elong, double phi, double height, double xyz[3]) |
Transform geodetic coordinates to geocentric. More... | |
int iauGc2gd | ( | int | n, |
double | xyz[3], | ||
double * | elong, | ||
double * | phi, | ||
double * | height | ||
) |
Transform geocentric coordinates to geodetic.
Transform geocentric coordinates to geodetic using the specified reference ellipsoid.
[in] | n | ellipsoid identifier (Note 1) |
[in] | xyz | geocentric vector (Note 2) |
[out] | elong | longitude (radians, east +ve, Note 3) |
[out] | phi | latitude (geodetic, radians, Note 3) |
[out] | height | height above ellipsoid (geodetic, Notes 2,3) |
Notes:
1) The identifier n is a number that specifies the choice of reference ellipsoid. The following are supported:
n ellipsoid
1 WGS84 2 GRS80 3 WGS72
The n value has no significance outside the SOFA software. For convenience, symbols WGS84 etc. are defined in sofam.h.
2) The geocentric vector (xyz, given) and height (height, returned) are in meters.
3) An error status -1 means that the identifier n is illegal. An error status -2 is theoretically impossible. In all error cases, all three results are set to -1e9.
4) The inverse transformation is performed in the function iauGd2gc.
int iauGd2gc | ( | int | n, |
double | elong, | ||
double | phi, | ||
double | height, | ||
double | xyz[3] | ||
) |
Transform geodetic coordinates to geocentric.
Transform geodetic coordinates to geocentric using the specified reference ellipsoid.
[in] | n | ellipsoid identifier (Note 1) |
[in] | elong | longitude (radians, east +ve) |
[in] | phi | latitude (geodetic, radians, Note 3) |
[in] | height | height above ellipsoid (geodetic, Notes 2,3) |
[out] | xyz | geocentric vector (Note 2) |
Notes:
1) The identifier n is a number that specifies the choice of reference ellipsoid. The following are supported:
n ellipsoid
1 WGS84 2 GRS80 3 WGS72
The n value has no significance outside the SOFA software. For convenience, symbols WGS84 etc. are defined in sofam.h.
2) The height (height, given) and the geocentric vector (xyz, returned) are in meters.
3) No validation is performed on the arguments elong, phi and height. An error status -1 means that the identifier n is illegal. An error status -2 protects against cases that would lead to arithmetic exceptions. In all error cases, xyz is set to zeros.
4) The inverse transformation is performed in the function iauGc2gd.