Go to the documentation of this file.
11 #include <Eigen/Dense>
34 cout <<
"Point 0: lat=" << p0.lat <<
" lon=" << p0.lon
35 <<
" alt=" << p0.height << endl;
36 cout <<
"Point 1: lat=" << p1.lat <<
" lon=" << p1.lon
37 <<
" alt=" << p1.height << endl;
41 cout <<
"ENU XYZ coords: " << p << endl;
50 cout <<
"P0 XYZ geocentric coords: " << geo0 << endl;
51 cout <<
"P1 XYZ geocentric coords: " << geo1 << endl;
56 pt0.lon, pt0.lat, pt0.height, pose_ENU);
57 cout <<
"ENU system of coordinates for lat=" << pt0.lat
58 <<
" lon=" << pt0.lon <<
" alt=" << pt0.height <<
" is: \n"
63 cout <<
"P0->P1: " << (geo1 - geo0) << endl;
64 cout <<
"(p1.h-p0.h)*ENU_Z: "
67 .blockCopy<3, 1>(0, 2)
73 cout << endl <<
"UTM coordinate test:" << endl;
75 double lats[] = {40.3154333, 46.283900, 37.577833,
76 28.645650, 38.855550, 25.061783};
77 double lons[] = {-3.4857166, 7.8012333, -119.95525,
78 -17.759533, -94.7990166, 121.640266};
81 for (
size_t i = 0; i <
sizeof(lats) /
sizeof(lats[0]); i++)
84 const double la = lats[i];
85 const double lo = lons[i];
89 cout <<
"Lat: " << la <<
" Lon: " << lo <<
" x: " << UTMCoords.
x
90 <<
" y: " << UTMCoords.
y <<
" zone: " << zone <<
" band: " << band
97 const double lon0 = -3.733572031;
98 const double lat0 = 37.89250616;
99 const double h0 = 515.579;
102 cout <<
format(
"Point: lon=%.012f lat=%.012f h=%.04f\n", lon0, lat0, h0);
108 cout <<
"In geocentric coords: " << p << endl;
124 cout <<
"MRPT exception caught: " << e.what() << endl;
129 printf(
"Untyped exception!!");
MATRIX44 getHomogeneousMatrixVal() const
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (t...
void ENU_axes_from_WGS84(double in_longitude_reference_degrees, double in_latitude_reference_degrees, double in_height_reference_meters, mrpt::math::TPose3D &out_ENU, bool only_angles=false)
Returns the East-North-Up (ENU) coordinate system associated to the given point.
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...
void getRotationMatrix(mrpt::math::CMatrixDouble33 &ROT) const
Get the 3x3 rotation matrix.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void geodeticToUTM(const TGeodeticCoords &GeodeticCoords, TUTMCoords &UTMCoords, int &UTMZone, char &UTMLatitudeBand, const TEllipsoid &ellip=TEllipsoid::Ellipsoid_WGS84())
void geodeticToGeocentric_WGS84(const TGeodeticCoords &in_coords, mrpt::math::TPoint3D &out_point)
Coordinates transformation from longitude/latitude/height to geocentric X/Y/Z coordinates (with a WGS...
A compile-time fixed-size numeric matrix container.
A set of geodetic coordinates: latitude, longitude and height, defined over a given geoid (typically,...
constexpr double RAD2DEG(const double x)
Radians to degrees.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void TestGeoid2Geocentric()
This base provides a set of functions for maths stuff.
std::string std::string format(std::string_view fmt, ARGS &&... args)
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020 | |