# Interactive geodetic coordinates

For some applications of geodesy, the Earth is modelled as an ellipsoid, since the planet bulges at the equator.

To help gain intuition for how this impacts coordinate systems, the following interactive diagram depicts a fictional planet which has a diameter of 80m and a height of 40m:

The diagram is a cross-section through the planet, with North at the top. The following points are labelled:

**Point A**follows the mouse. This is the reference point being measured.- The
*lat*,*lon*and*alt*shown at the top-left are calculated for this point.

- The
**Point O**is the geocentric origin of the planet, which is its center of mass.**Point S**is the same*lat*and*lon*as**Point A**, but on with**alt**set to zero, projecting the point to be on the planet’s*surface*.**Point G**is where the geodetic latitute intersects the equatorial plane.- In other words,
*lat*is the angle at**Point G**between the horizontal axis and the yellow line.

- In other words,

Things go a little wonky if you move **Point A** inside the ellipsoid, moreso nearer towards the equatorial plane.

## Implementation §

The diagram is an SVG, which uses some JavaScript based upon this library for the geodesy calculations. Specifically:

- Vector3D - For the vector class that stores the positions.
- DMS (Degrees/Minutes/Seconds) - For the wrapping.
- LatLonEllipsoidal - For converting Cartesian coordinates to ellipsoidal lat/lon/alt and back again.