Package pygeodesy :: Module ecef |
[frames] | no frames]

# Module ecef

Geocentric conversions transcribed from Charles Karney's C++ classes Geocentric and LocalCartesian into pure Python classes EcefKarney respectively EcefCartesian, class EcefVeness transcribed from Chris Veness' JavaScript classes LatLonEllipsoidal, Cartesian and class EcefYou implementing Rey-Jer You's transformations.

Convert between geodetic coordinates `lat`-, `lon`gitude and height `h` (measured vertically from the surface of the ellipsoid) to geocentric `x`, `y` and `z` coordinates, also known as Earth-Centered, Earth-Fixed (ECEF).

The origin of geocentric coordinates is at the center of the earth. The `z` axis goes thru the North pole, `lat` = 90°. The `x` axis goes thru `lat` = 0°, `lon` = 0°.

The origin of local cartesian coordinate system is at `lat0`, `lon0` and `height0`. The `z` axis is normal to the ellipsoid, the `y` axis points due North. The plane `z = -height0` is tangent to the ellipsoid.

Forward conversion from geodetic to geocentric (ECEF) coordinates is straightforward.

For the reverse transformation we use Hugues Vermeille's Direct transformation from geocentric coordinates to geodetic coordinates, J. Geodesy (2002) 76, 451-454.

Several changes have been made to ensure that the method returns accurate results for all finite inputs (even if h is infinite). The changes are described in Appendix B of C. F. F. Karney Geodesics on an ellipsoid of revolution, Feb. 2011, 85, 105-117 (preprint). Vermeille similarly updated his method in An analytical method to transform geocentric into geodetic coordinates, J. Geodesy (2011) 85, 105-117. See Geocentric coordinates for more information.

The errors in these routines are close to round-off. Specifically, for points within 5,000 km of the surface of the ellipsoid (either inside or outside the ellipsoid), the error is bounded by 7 nm (7 nanometers) for the WGS84 ellipsoid. See Geocentric coordinates for further information on the errors.

Version: 20.01.22

Classes
| EcefError An ECEF issue.
| _EcefBase (INTERNAL) Base class for EcefKarney, EcefVeness and EcefYou.
| EcefKarney Conversion between geodetic and geocentric, aka Earth-Centered, Earth-Fixed (ECEF) coordinates based on Karney's Geocentric methods.
| EcefCartesian Conversion between geodetic `(lat, lon, height)` and local cartesian `(x, y, z)` coordinates with a local cartesian origin at `(lat0, lon0, height0)` transcibed from on Karney's C++ class LocalCartesian.
| EcefMatrix A rotation matrix.
| Ecef9Tuple 9-Tuple `(x, y, z, lat, lon, height, C, M, datum)` with geocentric coordinates `x`, `y` and `z`, geodetic coordinates `lat`, `lon` and `height`, case `C` and optionally, the EcefMatrix `M` and `datum`, with `lat` and `lon` in `degrees` and `x`, `y`, `z` and `height` in `meter`, usually.
| EcefVeness Conversion between geodetic and geocentric, aka Earth-Centered, Earth-Fixed (ECEF) coordinates transcribed from Chris Veness' JavaScript classes LatLonEllipsoidal, Cartesian.
| EcefYou Conversion between geodetic and geocentric, aka Earth-Centered, Earth-Fixed (ECEF) coordinates using Rey-Jer You's transformations.