Skip to content

Main content

ECEF to Geodetic Coordinate Converter

Convert exterior/near-surface ECEF meters to geodetic latitude, longitude and ellipsoidal height with bounded iteration and explicit round-trip residual; excludes deep-interior ambiguous normals.

Loading tool…

Description

Convert ECEF coordinates to geodetic latitude, longitude and ellipsoidal height with bounded iteration and a reconstruction residual.

Geodesy distinguishes a mathematical reference ellipsoid, a realized coordinate datum and the physical gravity field. Geodetic latitude follows the ellipsoid normal; geocentric latitude follows a radius from the center. Ellipsoidal height, orthometric height and geoid undulation are separate signed quantities. Keep the declared ellipsoid, coordinate axes, angular units and time scale with a result.

Convert ECEF coordinates to geodetic latitude, longitude and ellipsoidal height with bounded iteration and a reconstruction residual.

Geodetic latitude, longitude and ellipsoidal height can be represented as geocentric Cartesian coordinates on an explicit ellipsoid. Changing representation alone does not change a datum or epoch.1

When to use this tool

Use this tool when you need to convert ECEF coordinates to geodetic latitude, longitude and ellipsoidal height with bounded iteration and a reconstruction residual.

How to use the tool and how it works

  1. Enter semiMajorMeters, flattening, ecefMeters using the definitions below.
  2. Run the operation. Resolve input-format errors before interpreting an output.
  3. Read result.latitudeDegrees, result.longitudeDegrees, result.ellipsoidalHeightMeters, result.iterations, result.residualMeters, result.converged, using the stated boundary, ordering, sign and absence conventions.

Convert the explicit [X,Y,Z] meter vector into longitude atan2(Y,X) and iteratively solve geodetic latitude, at most 32 steps with 10⁻¹⁴-radian update threshold. Recover ellipsoidal height, reconstruct ECEF, and report the reconstruction residual and convergence flag.2

Input fieldMeaning and unitsAccepted input
semiMajorMetersEquatorial semiaxis a in meters, 1–10⁸. It is a radius, not a diameter.Finite numeric value satisfying the stated comparisons.
flatteningDimensionless ordinary flattening f=(a-b)/a, from zero through 0.02; supply f rather than inverse flattening.Finite numeric value satisfying the stated comparisons.
ecefMetersThree-element [X,Y,Z] geocentric Cartesian meter vector; individual magnitudes≤10⁹ and any radius restrictions stated above apply.Dense list of at most 128 finite numbers, under the stated integer/range rules.
Output fieldInterpretation
resultObject containing the fields below.
result.latitudeDegreesResulting geodetic latitude in degrees, or null on direct-geodesic nonconvergence.
result.longitudeDegreesResulting east-positive longitude in [−180,180) degrees, or null on direct-geodesic nonconvergence.
result.ellipsoidalHeightMetersSigned ellipsoidal height in meters on the supplied model.
result.iterationsNumber of bounded numerical iterations performed.
result.residualMetersFinal reconstruction or arc residual in meters under the stated algorithm; arc residual is signed, vector residual a magnitude.
result.convergedWhether the operation’s stated iteration or reconstruction criterion succeeded; inspect null values and residual/reason evidence.
json
{
  "input": {
    "semiMajorMeters": 10,
    "flattening": 0,
    "ecefMeters": [
      10,
      0,
      0
    ]
  },
  "output": {
    "result": {
      "latitudeDegrees": 0,
      "longitudeDegrees": 0,
      "ellipsoidalHeightMeters": 0,
      "iterations": 1,
      "residualMeters": 0,
      "converged": true
    }
  }
}

Limitations and assumptions

  • Require radius between a/2 and 10⁹ m, excluding the deep interior. At the Cartesian axis longitude is conventionally zero. converged tests residual≤max(10⁻⁶ m,radius×10⁻¹³); this is a numerical self-consistency check, not a position-accuracy claim.
  • All quantities are finite and retain the units stated for this operation. Ellipsoid-parameter tools use semi-major axis 1–10⁸ m and dimensionless flattening 0–0.02; explicit-axis tools use 0.9a≤b≤a unless a tighter bound is stated. These tools do not fetch datums, geoid grids, satellite observations or Earth-orientation updates.
  • Every declared outer field is required and unknown outer fields are rejected. Strings and JSON text have size limits, lists are bounded to 128 entries, and JSON nesting/node counts are bounded. Tighter operation-specific bounds stated above take precedence.
  • Numeric results must be finite. Large physical magnitudes are allowed by the output evidence checks, while integer fields and source schemas retain their exactness rules. Source indexes are zero-based. Floating-point residues can remain even where an ideal formula gives an exact zero.

Alternative or Complementary methods

Use a coordinate transform for a change of representation and explicit datum parameters for a change of reference frame. Preserve model and convergence metadata, and use observation and datum information appropriate to a real survey before interpreting a computed tolerance as accuracy.

References

  1. Geodetic to Cartesian conversion: ellipsoid and coordinate conventions — PROJ

  2. Tool behavior and example: Geodetic from ECEF XYZ Iterative Converter — tool.io

Similar or alternative tools