SOFA  20200721
Functions
canonical transformation

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...
 

Detailed Description

Function Documentation

◆ iauGc2gd()

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.

Parameters
[in]nellipsoid identifier (Note 1)
[in]xyzgeocentric vector (Note 2)
[out]elonglongitude (radians, east +ve, Note 3)
[out]philatitude (geodetic, radians, Note 3)
[out]heightheight above ellipsoid (geodetic, Notes 2,3)
Returns
0 = OK -1 = illegal identifier (Note 3) -2 = internal error (Note 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.

Here is the call graph for this 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.

Parameters
[in]nellipsoid identifier (Note 1)
[in]elonglongitude (radians, east +ve)
[in]philatitude (geodetic, radians, Note 3)
[in]heightheight above ellipsoid (geodetic, Notes 2,3)
[out]xyzgeocentric vector (Note 2)
Returns
0 = OK -1 = illegal identifier (Note 3) -2 = illegal case (Note 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 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.

Here is the call graph for this function: