sarkit.wgs84.geodetic_to_cartesian

geodetic_to_cartesian(latlonhae)

Converts WGS 84 geodetic coordinates to cartesian coordinates.

Parameters:
latlonhae(…, 3) array_like

Array of geodetic coordinates with [latitude (deg), longitude (deg), and ellipsoidal height (m)] in the last dimension.

Returns:
(…, 3) ndarray

Array of cartesian coordinates with X, Y, Z components in meters in the last dimension.

Examples

>>> import sarkit.wgs84
>>> sarkit.wgs84.geodetic_to_cartesian([[0,0,0], [0,90,0], [90,0,0]]).round(3)
array([[6378137.   ,       0.   ,       0.   ],
       [      0.   , 6378137.   ,       0.   ],
       [      0.   ,       0.   , 6356752.314]])