chaosmagpy.coordinate_utils.geo_to_gg

chaosmagpy.coordinate_utils.geo_to_gg(radius, theta, B_radius=None, B_theta=None)[source]

Compute geodetic coordinates and components as defined by the World Geodetic System 1984 (WGS84) from spherical geographic coordinates and components.

The equatorial and polar radius of the ellipsoid that approximates Earth’s surface are stored in chaosmagpy.basicConfig['params.ellipsoid'].

Parameters:
radiusndarray, shape (…)

Radius in kilometers.

thetandarray, shape (…)

Geocentric colatitude in degrees.

B_radiusndarray, shape (…), optional

Radially upward vector component.

B_thetandarray, shape (…), optional

Spherical southward vector component.

Returns:
heightndarray, shape (…)

Altitude in kilometers.

betandarray, shape (…)

Geodetic colatitude in degrees.

Xndarray, shape (…), optional

Geodetic northward vector component (only returned if B_radius and B_theta are provided).

Zndarray, shape (…), optional

Geodetic downward vector component (only returned if B_radius and B_theta are provided).

Notes

Round-off errors might lead to a failure of the algorithm especially but not exclusively for points close to the geographic poles. Corresponding geodetic coordinates are returned as NaN.

References

The function uses Heikkinen’s algorithm taken from “Conversion of Earth-centered Earth-fixed coordinates to geodetic coordinates” by Zhu, J. in: IEEE Transactions on Aerospace and Electronic Systems, 1994, vol. 30, num. 3, pp. 957-961. The vector rotation is taken from Equation (4) in “5.02 - The Present and Future Geomagnetic Field” by Hulot et al. in: Treatise on Geophysics, Elsevier, 2015.