#include "cgeoid.h"#include "GeographicLib/Geoid.hpp"extern"C"doubleHeightAboveEllipsoid(doublelat,doublelon,doubleh){try{// Declare static so that g is only constructed oncestaticconstGeographicLib::Geoidg("egm2008-1");returnh+GeographicLib::Geoid::GEOIDTOELLIPSOID*g(lat,lon);}catch(...){returnGeographicLib::Math::NaN();}}