Geocentric coordinates test
parent
088d85d8ba
commit
32455c3817
|
|
@ -18,6 +18,8 @@
|
||||||
#include <GeographicLib/Geocentric.hpp>
|
#include <GeographicLib/Geocentric.hpp>
|
||||||
#include <CppUnitLite/TestHarness.h>
|
#include <CppUnitLite/TestHarness.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
//using namespace gtsam;
|
//using namespace gtsam;
|
||||||
using namespace GeographicLib;
|
using namespace GeographicLib;
|
||||||
|
|
@ -31,6 +33,12 @@ TEST( GeographicLib, Geocentric) {
|
||||||
// Dekalb-Peachtree Airport runway 2L
|
// Dekalb-Peachtree Airport runway 2L
|
||||||
double lat = 33.87071, lon = -84.30482000000001, h = 274;
|
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
|
// UTM is 45N 250694.42 3751090.08
|
||||||
// Obtained by
|
// Obtained by
|
||||||
// http://geographiclib.sourceforge.net/cgi-bin/GeoConvert?input=33.87071+84.30482000000001&zone=-3&prec=2&option=Submit
|
// http://geographiclib.sourceforge.net/cgi-bin/GeoConvert?input=33.87071+84.30482000000001&zone=-3&prec=2&option=Submit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue