cgeoid.cpp
Go to the documentation of this file.
1 #include "cgeoid.h"
3 
4 extern "C"
5 double HeightAboveEllipsoid(double lat, double lon, double h) {
6  try {
7  // Declare static so that g is only constructed once
8  static const GeographicLib::Geoid g("egm2008-1");
9  return h + GeographicLib::Geoid::GEOIDTOELLIPSOID * g(lat, lon);
10  }
11  catch (...) {
12  return GeographicLib::Math::NaN();
13  }
14 }
static T NaN()
Definition: Math.hpp:830
static const double lat
void g(const string &key, int i)
Definition: testBTree.cpp:43
const double h
static const double lon
double HeightAboveEllipsoid(double lat, double lon, double h)
Definition: cgeoid.cpp:5
Header for GeographicLib::Geoid class.
Looking up the height of the geoid above the ellipsoid.
Definition: Geoid.hpp:82


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:46