EphCore.Geometry.Geodetic (eph_core v0.1.0)

Copy Markdown View Source

WGS84 geodetic conversions.

Summary

Functions

Local east/north/up unit vectors in ECEF for a geodetic lat/lon.

Functions

enu_basis_ecef(lat_deg, lon_deg)

@spec enu_basis_ecef(float(), float()) :: %{
  east: {float(), float(), float()},
  north: {float(), float(), float()},
  up: {float(), float(), float()}
}

Local east/north/up unit vectors in ECEF for a geodetic lat/lon.

up is the ellipsoid normal (the geodetic vertical), not the geocentric radial — so the resulting horizon plane accounts for the WGS84 deflection of the vertical (≈0.1–0.2° at mid-latitudes), which a position-vector basis omits.

to_ecef_km(lat_deg, lon_deg, height_m)

@spec to_ecef_km(float(), float(), float()) :: {float(), float(), float()}