[rv, xyz] = ERFA.gd2gce( a, f, elong, phi, height)Transform geodetic coordinates to geocentric for a reference ellipsoid of specified form.
a double equatorial radius (Notes 1,4)
f double flattening (Notes 2,4)
elong double longitude (radians, east +ve)
phi double latitude (geodetic, radians, Note 4)
height double height above ellipsoid (geodetic, Notes 3,4)
xyz double[3] geocentric vector (Note 3)
int status: 0 = OK
-1 = illegal case (Note 4)
-
The equatorial radius, a, can be in any units, but meters is the conventional choice.
-
The flattening, f, is (for the Earth) a value around 0.00335, i.e. around 1/298.
-
The equatorial radius, a, and the height, height, must be given in the same units, and determine the units of the returned geocentric vector, xyz.
-
No validation is performed on individual arguments. The error status -1 protects against (unrealistic) cases that would lead to arithmetic exceptions. If an error occurs, xyz is unchanged.
-
The inverse transformation is performed in the function eraGc2gde.
-
The transformation for a standard ellipsoid (such as ERFA_WGS84) can more conveniently be performed by calling eraGd2gc, which uses a numerical code to identify the required a and f values.
Green, R.M., Spherical Astronomy, Cambridge University Press, (1985) Section 4.5, p96.
Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed), University Science Books (1992), Section 4.22, p202.
This revision: 2021 May 11
Copyright (C) 2013-2021, NumFOCUS Foundation. Derived, with permission, from the SOFA library.