ADD: new track message, Entity class and Position class
This commit is contained in:
14
libs/geographiclib/wrapper/c/cgeoid.cpp
Normal file
14
libs/geographiclib/wrapper/c/cgeoid.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "cgeoid.h"
|
||||
#include "GeographicLib/Geoid.hpp"
|
||||
|
||||
extern "C"
|
||||
double HeightAboveEllipsoid(double lat, double lon, double h) {
|
||||
try {
|
||||
// Declare static so that g is only constructed once
|
||||
static const GeographicLib::Geoid g("egm2008-1");
|
||||
return h + GeographicLib::Geoid::GEOIDTOELLIPSOID * g(lat, lon);
|
||||
}
|
||||
catch (...) {
|
||||
return GeographicLib::Math::NaN();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user