surf_coord_from_surf_pos#
- Ellipsoid.surf_coord_from_surf_pos(self, r_surf: ndarray[double]) ndarray[SurfCoord_dtype]#
Compute geodetic latitude and longitude from ECEF surface position vector(s).
Given a scalar or 1-D array of ECEF surface position vectors on the reference ellipsoid, return the corresponding geodetic coordinates (latitude φ, longitude λ).
- Parameters:
- r_surffloat or ndarray of float, shape (3,) or (N, 3)
ECEF surface position vector(s) [x, y, z] in metres. - If shape is (3,), treated as a single point. - If shape is (N, 3), treated as N points.
- Returns:
- coordsndarray of SurfCoord_dtype, shape (1,) or (N,)
Structured array of geodetic coordinates. Each element has fields:
lat : float Geodetic latitude φ in radians.
lon : float Geodetic longitude λ in radians.
- Raises:
- AssertionError
If r_surf does not have shape (3,) or (N, 3).
See also
r_surfForward conversion: geodetic (φ, λ) → ECEF surface position vector.
Notes
Internally dispatches to the low-level C routine
c_surf_coord_from_surf_posfor each point, releasing the GIL for speed.