Function navtk::navutils::hae_to_msl
Defined in File navigation.hpp
Function Documentation
-
std::pair<bool, double> navtk::navutils::hae_to_msl(double hae, double latitude, double longitude, const std::string &path = "WW15MGH.GRD")
Convert from Height Above Ellipsoid (HAE) to Mean Sea Level (MSL) elevation, using the difference between the two at the given coordinates.
Taken from Section 2.4.1.2 of Shockley PhD Dissertation: Ground Vehicle Navigation Using Magnetic Field Variation, 2012 (available on dtic.mil)
- Parameters
hae – The HAE elevation in meters elevation 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 MSL elevation in meters.