surf_pos_from_surf_coord#
- Ellipsoid.surf_pos_from_surf_coord(self, lat: double | ndarray[double], lon: double | ndarray[double]) ndarray[double]#
Compute the ECEF surface position vector(s) on the reference ellipsoid.
Given a scalar or 1-D array of geodetic latitudes \(\phi\) and longitudes \(\lambda\) (in radians, SI), return the corresponding surface radius vector(s) in Earth-Centered, Earth-Fixed (ECEF) coordinates.
- Parameters:
- latfloat or ndarray of float, shape (N,)
Geodetic latitude(s) \(\phi\) in radians.
- lonfloat or ndarray of float, shape (N,)
Geodetic longitude(s) \(\lambda\) in radians.
- Returns:
- r_surfndarray of float, shape (3,) or (N, 3)
Surface position vector(s) \(\mathbf{r}\) in metres. - If both lat and lon are scalars, returns a 1-D array
of length 3:
[x, y, z].If they are 1-D arrays of length N, returns an (N × 3) array where each row is
[x, y, z].
- Raises:
- AssertionError
If lat and lon are arrays with differing shapes.
See also
c_r_surfCore C implementation (nogil) computing a single r_surf.
Notes
Internally dispatches to the low-level C function c_r_surf for each point, releasing the GIL.
\[\mathbf{r}(\phi,\lambda) = egin{bmatrix} N(\phi)\cos\phi\cos\lambda \[6pt] N(\phi)\cos\phi\sin\lambda \[6pt] igl(N(\phi)\,(1 - e^2)igr)\sin\phi \end{bmatrix},\]where
\[N(\phi) = \]rac{a}{sqrt{1 - e^2,sin^2phi}}