Geoid undulation lookup and orthometric/ellipsoidal height conversion.
The geoid undulation N is the height of the geoid (mean sea level) above the
WGS84 ellipsoid in metres. GNSS yields the ellipsoidal height h; the
orthometric height (height above mean sea level) is H = h - N.
Two entry points are exposed over the sidereon-core geoid module:
- zero-setup lookups against the crate's COARSE 30-degree built-in global grid
(
undulation/2,orthometric_height_m/3,ellipsoidal_height_m/3), and - a loaded grid handle (
load_grid/1,grid/7) for a real vendor model, queried withgrid_undulation_deg/3/grid_undulation_rad/3.
The built-in grid is suitable for sanity checks and metre-scale fallback, not survey work; load a real model for accuracy.
Latitude is positive north, longitude positive east. The built-in lookups and
grid_undulation_rad/3 take radians; grid_undulation_deg/3 takes degrees.
Summary
Functions
Ellipsoidal height h = H + N (metres) from an orthometric height, using the
embedded genuine EGM96 1-degree model. Position in radians.
Orthometric height H = h - N (metres) from an ellipsoidal height, using the
embedded genuine EGM96 1-degree model. Position in radians.
Geoid undulation N (metres) at a geodetic position in radians, from the
embedded genuine EGM96 1-degree global grid.
Ellipsoidal height h = H + N (metres) from an orthometric height, using the
built-in grid. Position in radians.
Build a geoid grid handle from its origin, spacing, dimensions, and row-major samples (metres).
Bilinearly interpolated undulation N (metres) from a loaded grid handle, at a
geodetic position in degrees.
Bilinearly interpolated undulation N (metres) from a loaded grid handle, at a
geodetic position in radians.
Parse a geoid grid in the crate's documented text format into a handle.
Orthometric height H = h - N (metres) from an ellipsoidal height, using the
built-in grid. Position in radians.
Built-in coarse-grid geoid undulation N (metres) at a geodetic position in
radians.
Types
@type grid() :: reference()
Functions
Ellipsoidal height h = H + N (metres) from an orthometric height, using the
embedded genuine EGM96 1-degree model. Position in radians.
Orthometric height H = h - N (metres) from an ellipsoidal height, using the
embedded genuine EGM96 1-degree model. Position in radians.
Geoid undulation N (metres) at a geodetic position in radians, from the
embedded genuine EGM96 1-degree global grid.
This is the recommended zero-setup default for metre-class datum work: its
bilinear lookup agrees with the full 15-arcminute EGM96 grid to ~0.4 m RMS,
far better than the coarse 30-degree built-in undulation/2.
Ellipsoidal height h = H + N (metres) from an orthometric height, using the
built-in grid. Position in radians.
@spec grid( number(), number(), number(), number(), non_neg_integer(), non_neg_integer(), [number()] ) :: {:ok, grid()} | {:error, term()}
Build a geoid grid handle from its origin, spacing, dimensions, and row-major samples (metres).
values_m is a flat list of n_lat * n_lon floats. Returns
{:ok, reference()} or {:error, reason}.
Bilinearly interpolated undulation N (metres) from a loaded grid handle, at a
geodetic position in degrees.
Bilinearly interpolated undulation N (metres) from a loaded grid handle, at a
geodetic position in radians.
Parse a geoid grid in the crate's documented text format into a handle.
The format is whitespace-delimited with # comments: a six-field header
lat_min lon_min dlat dlon n_lat n_lon (degrees) followed by n_lat * n_lon
undulation samples in metres, row-major (latitude ascending outer). Returns
{:ok, reference()} or {:error, reason}.
Orthometric height H = h - N (metres) from an ellipsoidal height, using the
built-in grid. Position in radians.
Built-in coarse-grid geoid undulation N (metres) at a geodetic position in
radians.