Go to the documentation of this file.
11 #include <gtest/gtest.h>
22 c1, geo1, TEllipsoid::Ellipsoid_WGS84());
26 geo1, c2, TEllipsoid::Ellipsoid_WGS84());
28 EXPECT_NEAR(c1.
lat, c2.
lat, 1e-8);
29 EXPECT_NEAR(c1.
lon, c2.
lon, 1e-8);
33 TEST(TopographyConversion, GeodeticToGeocentricToGeodetic)
49 gps_point.
lon = -4.475828390;
50 gps_point.
lat = 36.716411055;
54 gps_ref.
lon = -4.4789588283333330;
55 gps_ref.
lat = 36.714459075;
61 TPoint3D P_true(279.679067794, 216.621954, 9.34448);
62 EXPECT_NEAR(P.
x, P_true.
x, 3e-3);
64 EXPECT_NEAR(P.
y, P_true.
y, 3e-3);
65 EXPECT_NEAR(P.
z, P_true.
z, 3e-3);
70 const double A_height = 15.0;
71 gps_point2.
height += A_height;
75 EXPECT_NEAR(P.
x, 0, 0.1e-3);
76 EXPECT_NEAR(P.
y, 0, 0.1e-3);
77 EXPECT_NEAR(P.
z, A_height, 0.1e-3);
void do_test_geodetic_geocentric(const TGeodeticCoords c1)
void geodeticToENU_WGS84(const TGeodeticCoords &in_coords, mrpt::math::TPoint3D &out_ENU_point, const TGeodeticCoords &in_coords_origin)
Coordinates transformation from longitude/latitude/height to ENU (East-North-Up) X/Y/Z coordinates Th...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TCoords lon
Longitude (in degrees)
TEST(TopographyConversion, GeodeticToGeocentricToGeodetic)
A set of geodetic coordinates: latitude, longitude and height, defined over a given geoid (typically,...
double x
X,Y,Z coordinates.
double height
Geodetic height (in meters)
This namespace provides topography helper functions, coordinate transformations.
This base provides a set of functions for maths stuff.
void geocentricToGeodetic(const TGeocentricCoords &in_point, TGeodeticCoords &out_coords, const TEllipsoid &ellip=TEllipsoid::Ellipsoid_WGS84())
Coordinates transformation from geocentric X/Y/Z coordinates to longitude/latitude/height.
void geodeticToGeocentric(const TGeodeticCoords &in_coords, TGeocentricCoords &out_point, const TEllipsoid &ellip)
Coordinates transformation from longitude/latitude/height to geocentric X/Y/Z coordinates (with an sp...
A coordinate that is stored as a simple "decimal" angle in degrees, but can be retrieved/set in the f...
TCoords lat
Latitude (in degrees)
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |