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

# Module ecef

Geocentric Earth-Centered, Earth-Fixed (ECEF) coordinates.

Geocentric conversions transcoded from Charles Karney's C++ class Geocentric into pure Python class EcefKarney, class EcefSudano based on John Sudano's paper, class EcefVeness transcoded from Chris Veness' JavaScript classes LatLonEllipsoidal, Cartesian, class EcefYou implementing Rey-Jer You's transformations and classes EcefFarrell22 and EcefFarrell22 from Jay A. Farrell's Table 2.1 and 2.2, page 29-30.

Following is a copy of Karney's Detailed Description.

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 local (cartesian) origin is at (`lat0`, `lon0`, `height0`). The local `x` axis points East, the local `y` axis points North and the local `z` axis is normal to the ellipsoid. The plane `z = -height0` is tangent to the ellipsoid, hence the alternate name local tangent plane.

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, page 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, page 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.

Note: The `reverse` methods of all `Ecef...` classes return by default `INT0` as the (geodetic) longitude for polar ECEF location `x == y == 0`. Use keyword argument `lon00` or property `lon00` to configure that value.

See Also: Module ltp and class LocalCartesian, a transcription of Charles Karney's C++ class LocalCartesian, for conversion between geodetic and local cartesian coordinates in a local tangent plane as opposed to geocentric (ECEF) ones.

Version: 23.12.18

Classes
| EcefError An ECEF or `Ecef*` related issue.
| _EcefBase (INTERNAL) Base class for EcefFarrell21, EcefFarrell22, EcefKarney, EcefSudano, EcefVeness and EcefYou.
| EcefFarrell21 Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates based on Jay A. Farrell's Table 2.1, page 29.
| EcefFarrell22 Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates based on Jay A. Farrell's Table 2.2, page 30.
| EcefKarney Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates transcoded from Karney's C++ Geocentric methods.
| EcefSudano Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates based on John J. Sudano's paper.
| EcefVeness Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates transcoded from Chris Veness' JavaScript classes LatLonEllipsoidal, Cartesian.
| EcefYou Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates using Rey-Jer You's transformation for non-prolate ellipsoids.
| EcefMatrix A rotation matrix known as East-North-Up (ENU) to ECEF.
| Ecef9Tuple 9-Tuple `(x, y, z, lat, lon, height, C, M, datum)` with geocentric `x`, `y` and `z` plus geodetic `lat`, `lon` and `height`, case `C` (see the `Ecef*.reverse` methods) and optionally, the rotation matrix `M` (EcefMatrix) and `datum`, with `lat` and `lon` in `degrees` and `x`, `y`, `z` and `height` in `meter`, conventionally.

Variables
| __all__ = `_ALL_LAZY.ecef`