Function navtk::navutils::geoid_minus_ellipsoid

Function Documentation

std::pair<bool, double> navtk::navutils::geoid_minus_ellipsoid(double latitude, double longitude, const std::string &path = "WW15MGH.GRD")

Get geoid undulation, equal to Mean Sea Level (MSL) elevation minus Height Above Ellipsoid (HAE), at the given coordinates.

Parameters
  • latitude – The latitude in radians at which to get the elevation.

  • longitude – The longitude in radians at which to get the elevation.

  • path – the path to the geoid undulation file for converting between HAE and MSL. The default path of this variable requires setting the NAVTK_DATA_DIR environment variable to the folder containing the undulation file. *

Returns

A pair showing whether a height was found (.first) and if true, the offset between MSL and HAE altitude in meters (.second).