OpenGNSSLabSPP

Module 8 - Geometry and quality

ECEF to ENU: Coordinates and Covariance

Rotate a position offset and its full covariance into local east, north and up.

Difficulty

Intermediate

Estimated time

20 minutes

Series position

8 of 10

What does an ECEF-to-ENU transformation do?

An ECEF-to-ENU rotation expresses a displacement in local east, north and up directions at a fixed origin. Applying the same rotation to the full position covariance gives local formal uncertainty. This lesson uses synthetic, reproducible teaching inputs.

Prepared by OpenGNSSLabUpdated Sources, reproducibility and corrections

Learning objectives

  • Separate an absolute ECEF position from a local offset.
  • Construct an ENU rotation from geodetic latitude and longitude.
  • Rotate the full covariance and interpret local formal precision.

Why horizontal is not ECEF X–Y

ECEF axes are fixed to the Earth: X meets the equator at longitude zero, Y at longitude 90° east, and Z follows the rotation axis. Local ENU axes follow the observer: east, north and the ellipsoidal normal.

At most locations ECEF Z is not local up. Rotating the position covariance gives uncertainties along the directions a receiver user cares about. All inputs below are synthetic teaching values; they are separate from the measured DD epoch.

Numerical inputs and conventions

InputValueMeaning
Geodetic latitude φ45°Ellipsoidal latitude, not geocentric latitude
Longitude λ0°Positive east
Ellipsoidal height0 mWGS 84 origin
Origin ECEF r₀[4517590.878849, 0, 4487348.408866] mRounded here; full precision in the download
Position ECEF r[4517591.878849, 2, 4487351.408866] mOrigin plus [1, 2, 3] m
Offset Δr[1, 2, 3] mECEF components relative to this origin

Computation step 1

Subtract the local origin before rotating

Formula

Δr=r−r0,pENU=RΔr\Delta\mathbf r=\mathbf r-\mathbf r_0,\qquad \mathbf p_{ENU}=R\Delta\mathbf r

Compute

ΔX=1 m,ΔY=2 m,ΔZ=3 m\Delta X=1\ \mathrm m,\quad\Delta Y=2\ \mathrm m,\quad\Delta Z=3\ \mathrm m

Result

The three-vector is a local displacement. Rotating r itself would keep the Earth's centre as its origin.

Why it matters: A baseline already expressed as an ECEF difference needs only rotation. An absolute position needs translation first.

Build the ECEF-to-ENU rotation

R=[−sin⁡λcos⁡λ0−sin⁡φcos⁡λ−sin⁡φsin⁡λcos⁡φcos⁡φcos⁡λcos⁡φsin⁡λsin⁡φ]R=\begin{bmatrix}-\sin\lambda&\cos\lambda&0\\-\sin\varphi\cos\lambda&-\sin\varphi\sin\lambda&\cos\varphi\\\cos\varphi\cos\lambda&\cos\varphi\sin\lambda&\sin\varphi\end{bmatrix}
Rows are the east, north and up unit vectors expressed in ECEF. Angles must be converted to radians in code.

Substitute φ = 45°, λ = 0°

R=[010−0.707106781200.70710678120.707106781200.7071067812]R=\begin{bmatrix}0&1&0\\-0.7071067812&0&0.7071067812\\0.7071067812&0&0.7071067812\end{bmatrix}
R Rᵀ = I and det(R) = +1. Thus the inverse rotation is Rᵀ.

Computation step 2

Compute all three local components

Substitute

E=0(1)+1(2)+0(3)=2E=0(1)+1(2)+0(3)=2
N=−0.7071067812(1)+0(2)+0.7071067812(3)=1.4142135624N=-0.7071067812(1)+0(2)+0.7071067812(3)=1.4142135624
U=0.7071067812(1)+0(2)+0.7071067812(3)=2.8284271247U=0.7071067812(1)+0(2)+0.7071067812(3)=2.8284271247

Result

The offset is 2 m east, 1.414214 m north and 2.828427 m up.

Why it matters: Its length remains √14 = 3.741657 m. Use Δr = Rᵀ p_ENU for the round trip.

Keep off-diagonal covariance terms

PXYZ=[4121902016] m2P_{XYZ}=\begin{bmatrix}4&1&2\\1&9&0\\2&0&16\end{bmatrix}\ \mathrm{m^2}
This is a supplied symmetric positive-definite position covariance, with correlations between X–Y and X–Z. It is not a geometry-only DOP matrix.

Propagate the full covariance

PENU=RPXYZRTP_{ENU}=R P_{XYZ}R^T
The origin and orientation are treated as fixed. Uncertainty in a shared origin, or cross-covariance between two estimated positions, needs a larger joint propagation model.

Computation step 3

Work through a variance and a cross-covariance

Compute

PNN=12PXX+12PZZ−PXZ=2+8−2=8 m2P_{NN}=\tfrac12 P_{XX}+\tfrac12 P_{ZZ}-P_{XZ}=2+8-2=8\ \mathrm{m^2}
PUU=12PXX+12PZZ+PXZ=2+8+2=12 m2P_{UU}=\tfrac12 P_{XX}+\tfrac12 P_{ZZ}+P_{XZ}=2+8+2=12\ \mathrm{m^2}
PEN=PYX(−1/2)+PYZ(1/2)=−0.7071067812 m2P_{EN}=P_{YX}(-1/\sqrt2)+P_{YZ}(1/\sqrt2)=-0.7071067812\ \mathrm{m^2}

Result

Dropping the X–Z covariance would incorrectly give both north and up variances as 10 m².

Inspect the complete ENU covariance

PENU=[9−0.70710678120.7071067812−0.7071067812860.7071067812612] m2P_{ENU}=\begin{bmatrix}9&-0.7071067812&0.7071067812\\-0.7071067812&8&6\\0.7071067812&6&12\end{bmatrix}\ \mathrm{m^2}
Trace is preserved: 4 + 9 + 16 = 9 + 8 + 12 = 29 m². The rotated matrix remains symmetric and positive definite.

Interpret local formal precision

QuantityCalculationResult
East σ√93.000000 m
North σ√82.828427 m
Up σ√123.464102 m
Horizontal RMS about the mean√(P_EE + P_NN) = √174.123106 m
3D RMS about the mean√trace(P) = √295.385165 m

RMS, confidence regions and accuracy are different

The horizontal RMS is not automatically a 95% radius. A confidence ellipse requires a distribution assumption, a confidence level and the eigenvalues of the horizontal 2 × 2 covariance. Bias and model errors can make measured accuracy worse than formal uncertainty.

For a geometry-only matrix Q, rotate the spatial block in exactly the same way: HDOP = √(q_EE + q_NN), VDOP = √q_UU. Those geometry factors are dimensionless. The P above has units m² and yields metre uncertainties.

Download and reproduce the example

Use this in the positioning lessons

  • Translate an absolute position; rotate a baseline directly.
  • Use geodetic latitude and the stated ENU ordering.
  • Rotate the full covariance, including correlations.
  • Continue to DOP, then SPP, LAMBDA and Double Difference.

Related tutorials

Help improve this tutorial

Point out numerical ambiguity, missing prerequisites, or a step that needs a fuller derivation.

Primary sources and further reading

The specifications and research below support the model and terminology. Numerical exports and teaching assumptions are documented in the lesson itself.

Browse the scientific reference library →

Continue with the numbers

GNSS terms and units · Report a correction