Function navtk::navutils::msl_to_hae

Function Documentation

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

Convert from Mean Sea Level (MSL) to Height Above Ellipsoid (HAE) elevation, using the difference between the two at the given coordinates.

Parameters
  • msl – The MSL elevation in meters at the given coordinates.

  • 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, or setting the NAVTK_GEOID_UNDULATION_PATH environment variable to the path of the file itself.

Returns

The HAE elevation in meters.