lla_from_pos#

Ellipsoid.lla_from_pos(self, r: ndarray[double]) ndarray[LLA_dtype]#

Convert ECEF position vector(s) to geodetic latitude, longitude, and altitude.

Given a single 3-element vector or an (N, 3) array of Earth-Centered, Earth-Fixed (ECEF) coordinates in metres (SI), return the corresponding geodetic coordinates on the reference ellipsoid.

Parameters:
rndarray of float, shape (3,) or (N, 3)

ECEF position vector(s) [x, y, z] in metres. - If r.shape == (3,), a single point is converted. - If r.shape == (N, 3), N points are converted.

Returns:
llandarray of LLA_dtype, shape (1,) or (N,)

Structured array with fields:

  • lat : float Geodetic latitude φ in radians.

  • lon : float Geodetic longitude λ in radians.

  • alt : float Height above the ellipsoid h in metres.

Raises:
AssertionError

If r is not a 1-D array of length 3 or a 2-D array with shape (N, 3).

See also

c_lla_from_pos

Core C implementation (nogil) converting a single ECEF vector to LLA.

Notes

  • Internally dispatches each point to the low-level C routine c_lla_from_pos, releasing the GIL for performance.

  • Uses an iterative ellipsoidal inversion algorithm to solve for φ and h.