Information Technology
ENContact

Earth Coordinates

Cartesian Coordinate System

Spherical Coordinates

The usual cartesian coordinate system associated with the Earth is specified as follows:

Each point on the Earth is uniquely defined by its cartesian coordinates (x, y, z). In fact, only 2 coordinates would suffice because each point is on the surface of a sphere:

x2 + y2 + z2 = R2
(1)

where R is the Earth's radius, R = 6371.010 km.

Since this cartesian coordinate system is fixed with the Earth, it is call Earth-centered Earth-fixed (ECEF) system.

Spherical Coordinate System

Points on the Earth are usually specified in the spherical coordinate system.

Spherical Coordinates

The spherical coordinates of an arbitrary cartesian point P(x, y, z) are:

  1. The latitude φ which is the angle between OP and the equator.
  2. The longitude λ which is the angle between the prime meridian and the meridian passing through OP.
  3. The radius r which is the distance of P from the origin.

Since the radius is constant, the two angles (φ, λ) are already sufficient to specify a point on the Earth:

Latitude (along equator)
-90° ≤ φ ≤ 90°
(2a)
Longitude (along meridian)
-180° < λ ≤ 180°
(2b)

The longitude at the poles is arbitrary and is usually set to 0° by convention.

We can easily find the relation between the cartesian and spherical coordinates. Let P(x, y, z) be a cartesian point, and P' its projection on the x/y-plane. The length OP' is

r' = r cosφ.
(3)

We can now compute the cartesian coordinates from the spherical coordinates:

x = r' cos λ = r cosφ cosλ
(4a)
y = r' sin λ = r cosφ sinλ
(4b)
z = r sin φ
(4c)

Solving these equations for (φ, λ, r) yields the opposite relationship:

r =  x2 + y2 + z2 
(5a)
φ = arcsin(z/r)
(5b)
λ = atan2(y, x)
(5c)

Here, the simple minded λ = arctan(y/x), which is valid only for -90° < λ < 90°, was replaced by the correct atan2(y, x), which yields -180° < λ ≤ 180°.

Geodetic Coordinate System

The spherical coordinate system is closely related to the geodetic system. In the geodetic system, the points are specified by latitude, longitude and elevation (height h). The elevation is measured orthogonal to a reference surface which is usually the earth ellipsoid. When we approximate the earth by a sphere with radius R, then

h = r - R.
(6)

ENU Coordinate System

ENU Coordinates

The ENU coordinate system is a local system specific to any point P on the Earth. It is formed from a plane tangent to the Earth's surface at the point P. In this plane,
the unit vector E points to the East,
the unit vector N points to the North.
The unit vector U points Up,
i.e. is orthogonal to the tangent plane.

The practical ENU coordinate system is used e.g. by Google Earth and other targeting and tracking applications.

The vector E = (Ex, Ey, Ez) is tangent to the circle of constant latitude passing through P. This circle is also called a "parallel circle" because it is parallel to the equator. The tangent is obtained by taking partial derivatives of the expressions (4) with respect to λ and normalizing the resulting vector to the length 1:

Ex = -sinλ.
(7a)
Ey = cosλ.
(7b)
Ez = 0. 
(7c)

The vector N = (Nx, Ny, Nz) is tangent to the meridian circle passing through P. So, by taking partial derivatives of the expressions (4) with respect to φ and normalizing the resulting vector to the length 1 we get:

Nx = -sinφ cosλ.
(8a)
Ny = -sinφ sinλ.
(8b)
Nz = cosφ.
(8c)

The unit vector U = (Ux, Uy, Uz) points in the direction of P. So, by setting r = 1 in the expressions (4), we get:

Ux = cosφ cosλ.
(9a)
Uy = cosφ sinλ.
(9b)
Uz = sinφ.
(9c)

Transforming ENU to ECEF

Let us consider a point Q that has the coordinates (x, y, z) in the ECEF system and coordinates Q' = (e, n, u) in the ENU system located at P = (Px, Py, Pz). The spherical coordinates of P are (φ, λ, R). Then the following equation transforms (e, n, u) to (x, y, z):

x -sinλ -sinφ cosλ cosφ cosλ e Px
y = cosλ -sinφ sinλ cosφ sinλ n + Py (10)
z 0 cosφ sinφ u Pz

Notice that the columns of the transformation matrix M are equal to the vectors E, N, U, respectively. Hence, the matrix M is orthonormal. It corresponds to the rotation of the XYZ-System around the origin into the ENU-System (centered at origin). The transformation is built by first rotating the vectors X, Y, Z around the origin into E, N, U, and then translating this system by the vector P into its final position.

The transformation can be written concisely using vector and matrix notation:

Q = M Q' + P
(11)

Transforming ECEF to ENU

The transformation from ECEF to ENU is obtained by inverting the transformation (11):

Q' = M-1 (Q - P) = MT (Q - P) 
(12)

Here we used the fact that the inverse of an orthonormal matrix is equal to the transformed matrix. This equation is in explicit terms as follows:

e -sinλ cosλ 0 x - Px
n = -sinφ cosλ -sinφ sinλ cosφ y - Py (13)
u cosφ cosλ cosφ sinλ sinφ z - Pz

Let me recall that this equation transforms the XYZ-coordinates (x, y, z) of an arbitrary point Q into its ENU-coordinates (e, n, u). The ENU system is located at the point P with XYZ-coordinates (Px, Py, Pz) and XYZ-spherical coordinates (φ, λ, R).

A thoughtful reader surely noticed an asymmetry in the respective transformations (11) and (12), even if they both express rotations and translations. This apparent problem is resolved as follows. The equation (12) can be written as:

Q' = M-1 Q - M-1 P 
(14)

The meaning is that the ENU system is first rotated around its origin at P by the inverse rotation such that its axes are parallel to the XYZ-system. Afterwards it is translated by the vector M-1 P such that its origin is moved to the origin O of the XYZ-system. Indeed, the expression M-1 P denotes the origin O = (0, 0, 0)T of the XYZ-system expressed in the ENU-system, as we can see by applying the equation (14) to the point O = (0, 0, 0)T:

O' = M-1 O - M-1 P = - M-1 P 
(15)

So, the equations (12) or (14), respectively, can be written as:

Q' = M-1 Q + O' 
(16)

which is completely symmetric to the equation (11). For computational purposes the equations (12) (respectively (13)) are preferable.

References