ECEF to latitude, longitude, and height
Converts Earth-centered, Earth-fixed X, Y, Z to geodetic latitude, longitude, and ellipsoidal height, in closed form at any height.
Latitude 40.446111°, longitude -79.982222°, ellipsoidal height 300 m.
- Longitude
- Ellipsoidal height
Provenance
- Computed by
- geodesy.frame.ecef-to-geodetic 1.0.0, core 0.1.0
- Model
- ECEF to geodetic (Vermeille closed form), WGS 84
- Accuracy
- Round trips close within 5 nm near the Earth's surface (a few units in the last place) and within 1e-15 of the distance at any height; matches GeographicLib CartConvert
- Notes
- None
- Cites
- Karney, C. F. F., GeographicLib, GeographicLib Geocentric and LocalCartesian classes; National Geospatial-Intelligence Agency, Department of Defense World Geodetic System 1984, NGA.STND.0036
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Vermeille (2011) closed form, as in GeographicLib's Geocentric class: no iteration
Accuracy: Round trips close within 5 nm near the Earth's surface (a few units in the last place) and within 1e-15 of the distance at any height; matches GeographicLib CartConvert
When to use this: Use this when a position arrives as Earth-centered X, Y, Z — from a GNSS receiver's raw output, a satellite product, or a coordinate exchange — and you need it as latitude, longitude, and height to plot or compare it. It is the inverse of the geodetic-to-ECEF tool and holds at any height, from below the surface to orbit.
Limitations: The height is above the ellipsoid, not above mean sea level: the geoid tool supplies the separation that turns one into the other. The frame the X, Y, Z came in matters as much as the arithmetic — ITRF, a WGS 84 realization, and a regional frame differ by centimeters to meters — and this conversion does not change frames or epochs.
Worked example: Pittsburgh at 300 m. Source: GeographicLib CartConvert -r: 40.446111, -79.982222, 300 m.
You enter
- X
- 845580.01037 m
- Y
- -4786836.716953 m
- Z
- 4116002.385436 m
You get
- Latitude
- 40.446111°
- Longitude
- -79.982222°
- Ellipsoidal height
- 300 m
Review: Not yet independently reviewed by a geodesist.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Changes
- 2026-09-19, changed: The four frame conversions are stable: geodetic to ECEF and back, and to and from a local east-north-up frame. They reproduce the IOGP Guidance Note 7-2 worked examples and agree with GeographicLib's CartConvert within 15 nm on 1,000 ECEF points (poles to beyond geostationary orbit) and 500 local targets. Results are unchanged. Changelog
Checked against: 30 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- GeographicLib Geocentric and LocalCartesian classes, Karney, C. F. F., GeographicLib, GeographicLib 2.x. Geocentric.cpp: Vermeille's closed-form inverse; LocalCartesian.cpp: ENU rotation. Read free.
- Department of Defense World Geodetic System 1984, NGA.STND.0036, National Geospatial-Intelligence Agency, NGA.STND.0036_1.0.0_WGS84. Table 3.1 (defining parameters) and Table 3.3 (derived geometric constants).
Terms
- ECEF: Earth-centered, Earth-fixed
- Cartesian X, Y, Z coordinates in meters from Earth's center, turning with the Earth. X points to 0° longitude on the equator and Z to the North Pole. Source: Department of Defense World Geodetic System 1984