Go to the documentation of this file.
33 cout <<
"Point 0: lat=" << p0.lat <<
" lon=" << p0.lon
34 <<
" alt=" << p0.height << endl;
35 cout <<
"Point 1: lat=" << p1.lat <<
" lon=" << p1.lon
36 <<
" alt=" << p1.height << endl;
40 cout <<
"ENU XYZ coords: " <<
p << endl;
49 cout <<
"P0 XYZ geocentric coords: " << geo0 << endl;
50 cout <<
"P1 XYZ geocentric coords: " << geo1 << endl;
55 pt0.lon, pt0.lat, pt0.height, pose_ENU);
56 cout <<
"ENU system of coordinates for lat=" << pt0.lat
57 <<
" lon=" << pt0.lon <<
" alt=" << pt0.height <<
" is: \n"
62 cout <<
"P0->P1: " << (geo1 - geo0) << endl;
63 cout <<
"(p1.h-p0.h)*ENU_Z: "
64 << (pt1.height - pt0.height) *
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!!");
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...
double RAD2DEG(const double x)
Radians to degrees.
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 set of geodetic coordinates: latitude, longitude and height, defined over a given geoid (typically,...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double x
X,Y,Z coordinates.
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
MATRIX44 getHomogeneousMatrixVal() const
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (t...
A numeric matrix of compile-time fixed size.
void TestGeoid2Geocentric()
GLsizei GLboolean transpose
This base provides a set of functions for maths stuff.
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 | |