# Local tangent plane coordinates

Local tangent plane coordinates (LTP) are part of a spatial reference system based on the tangent plane defined by the local vertical direction and the Earth's axis of rotation. They are also known as local ellipsoidal system, local geodetic coordinate system, local vertical, local horizontal coordinates (LVLH), or topocentric coordinates. It consists of three coordinates: one represents the position along the northern axis, one along the local eastern axis, and one represents the vertical position.
Two right-handed variants exist: east, north, up (ENU) coordinates and north, east, down (NED) coordinates. They serve for representing state vectors that are commonly used in aviation and marine cybernetics.

## Axes

These frames are location dependent. For movements around the globe, like air or sea navigation, the frames are defined as tangent to the lines of geographical coordinates:
* East–west tangent to parallels,
* North–south tangent to meridians, and
* Up–down in the direction normal to the oblate spheroid used as Earth's ellipsoid, which does not generally pass through the center of Earth.

## Local east, north, up (ENU) coordinates

In many targeting and tracking applications the local East, North, Up (ENU) Cartesian coordinate system is far more intuitive and practical than ECEF or Geodetic coordinates. The local ENU coordinates are formed from a plane tangent to the Earth's surface fixed to a specific location and hence it is sometimes known as a "Local Tangent" or "local geodetic" plane. By convention the east axis is labeled $x$, the north $y$ and the up $z$.

## Local north, east, down (NED) coordinates

In an airplane, most objects of interest are below the aircraft, so it is sensible to define down as a positive number. The North, East, Down (NED) coordinates allow this as an alternative to the ENU. By convention, the north axis is labeled $x'$, the east $y'$ and the down $z'$. This ensures NED coordinates to be right handed, as ENU coordinates are.
The origin of this coordinate system is usually chosen to be a fixed point on the surface of the geoid below the aircraft's center of gravity. When that is the case, the coordinate system is sometimes referred as a "local-North-East-Down Coordinate System".
NED coordinates are similar to ECEF in that they're Cartesian, however they can be more convenient due to the relatively small numbers involved, and also because of the intuitive axes. NED and ECEF coordinates can be related with the following formula:
    $\mathbf {p} _{\mathrm {NED} }=R(\mathbf {p} _{\mathrm {ECEF} }-\mathbf {p} _{\mathrm {Ref} })$
where $\mathbf {p} _{\mathrm {NED} }$ is a 3D position in a NED system, $\mathbf {p} _{\mathrm {ECEF} }$ is the corresponding ECEF position, $\mathbf {p} _{\mathrm {Ref} }$ is the reference ECEF position (where the local tangent plane originates), and $R$ is a rotation matrix whose rows are the north, east, and down axes. $R$ may be defined conveniently from the latitude $\phi$ and longitude $\lambda$ corresponding to $\mathbf {p} _{\mathrm {Ref} }$:
    $R={\begin{bmatrix}-\sin(\phi )\cos(\lambda )&-\sin(\phi )\sin(\lambda )&\cos(\phi )\\-\sin(\lambda )&\cos(\lambda )&0\\-\cos(\phi )\cos(\lambda )&-\cos(\phi )\sin(\lambda )&-\sin(\phi )\end{bmatrix}}$