Module swiftnav::coords[][src]

Expand description

Coordinates and conversions

These four primary coordinates types are defined:

  • LLHDegrees/LLHRadians - Geodetic coordinates, Latitude Lontitude Height
  • ECEF - Cartesian coordinates, Earth Centered, Earth Fixed
  • NED - Relative direction coordinates, North East Down
  • AzimuthElevation - Relative direction coordinates, Azimith Elevation

Conversion from geodetic coordinates latitude, longitude and height (ϕ, λ, h) into Cartesian coordinates (X, Y, Z) can be achieved with the following formulae:

  • X = (N(ϕ) + h) * cos(ϕ) * cos(λ)
  • Y = (N(ϕ) + h) * cos(ϕ) * sin(λ)
  • Z = [(1-e^2) * N(ϕ) + h] * sin(ϕ)

Where the ‘radius of curvature’, N(ϕ), is defined as:

  • N(ϕ) = a / sqrt(1-e^2 / sin^2(ϕ))

and a is the WGS84 semi-major axis and e is the WGS84 eccentricity.


Conversion from Cartesian to geodetic coordinates is a much harder problem than conversion from geodetic to Cartesian. There is no satisfactory closed form solution but many different iterative approaches exist.

Here we implement a relatively new algorithm due to Fukushima (2006) that is very computationally efficient, not requiring any transcendental function calls during iteration and very few divisions. It also exhibits cubic convergence rates compared to the quadratic rate of convergence seen with the more common algortihms based on the Newton-Raphson method.

References

  • “A comparison of methods used in rectangular to Geodetic Coordinates Transformations”, Burtch R. R. (2006), American Congress for Surveying and Mapping Annual Conference. Orlando, Florida.
  • “Transformation from Cartesian to Geodetic Coordinates Accelerated by Halley’s Method”, T. Fukushima (2006), Journal of Geodesy.

Structs

WGS84 Earth Centered, Earth Fixed (ECEF) Cartesian coordinates (X, Y, Z).

WGS84 geodetic coordinates (Latitude, Longitude, Height)

WGS84 geodetic coordinates (Latitude, Longitude, Height).

Local North East Down reference frame coordinates