diff --git a/gtsam/navigation/tests/testGeographicLib.cpp b/gtsam/navigation/tests/testGeographicLib.cpp index 05320e502..d31b72421 100644 --- a/gtsam/navigation/tests/testGeographicLib.cpp +++ b/gtsam/navigation/tests/testGeographicLib.cpp @@ -18,6 +18,8 @@ #include #include +#include + using namespace std; //using namespace gtsam; using namespace GeographicLib; @@ -31,6 +33,12 @@ TEST( GeographicLib, Geocentric) { // Dekalb-Peachtree Airport runway 2L double lat = 33.87071, lon = -84.30482000000001, h = 274; + double X, Y, Z; + earth.Forward(lat, lon, h, X, Y, Z); + EXPECT_DOUBLES_EQUAL(526, X/1000, 1); + EXPECT_DOUBLES_EQUAL(-5275, Y/1000, 1); + EXPECT_DOUBLES_EQUAL(3535, Z/1000, 1); + // UTM is 45N 250694.42 3751090.08 // Obtained by // http://geographiclib.sourceforge.net/cgi-bin/GeoConvert?input=33.87071+84.30482000000001&zone=-3&prec=2&option=Submit