49 #include <geometry_msgs/Point.h> 50 #include <geometry_msgs/Pose.h> 104 UTMPoint(
const geographic_msgs::GeoPoint &pt);
107 UTMPoint(
double _easting,
double _northing, uint8_t _zone,
char _band):
110 altitude(
std::numeric_limits<double>::quiet_NaN()),
116 UTMPoint(
double _easting,
double _northing,
double _altitude,
117 uint8_t _zone,
char _band):
147 position(that.position),
148 orientation(that.orientation)
152 UTMPose(
const geographic_msgs::GeoPose &pose):
153 position(pose.position),
154 orientation(pose.orientation)
159 const geometry_msgs::Quaternion &q):
166 const geometry_msgs::Quaternion &q):
179 const bool& force_zone=
false,
const char&
band=
'A',
const uint8_t&
zone=0 );
181 const bool& force_zone=
false,
const char&
band=
'A',
const uint8_t&
zone=0 );
208 geographic_msgs::GeoPoint ll(
toMsg(pt));
216 out <<
"(" << std::setprecision(10) << pt.
easting <<
", " 218 <<
" [" << (unsigned) pt.
zone << pt.
band <<
"])";
248 geometry_msgs::Point to;
258 geometry_msgs::Pose to;
char band
MGRS latitude band letter.
WGS 84 geodetic system for ROS latitude and longitude messages.
UTMPose(const UTMPose &that)
void fromMsg(const geographic_msgs::GeoPoint &from, UTMPoint &to, const bool &force_zone=false, const char &band='A', const uint8_t &zone=0)
UTMPoint(double _easting, double _northing, double _altitude, uint8_t _zone, char _band)
double northing
northing within grid zone [meters]
double altitude
altitude above ellipsoid [meters] or NaN
static bool sameGridZone(const UTMPoint &pt1, const UTMPoint &pt2)
geometry_msgs::Quaternion orientation
uint8_t zone
UTM longitude zone number.
static geometry_msgs::Point toGeometry(const UTMPoint &from)
UTMPose(const geographic_msgs::GeoPose &pose)
UTMPoint(const UTMPoint &that)
UTMPoint(double _easting, double _northing, uint8_t _zone, char _band)
static bool is2D(const UTMPoint &pt)
static void normalize(UTMPoint &pt)
bool isValid(const UTMPoint &pt)
UTMPose(const geographic_msgs::GeoPoint &pt, const geometry_msgs::Quaternion &q)
double easting
easting within grid zone [meters]
static std::ostream & operator<<(std::ostream &out, const UTMPoint &pt)
geographic_msgs::GeoPoint toMsg(const UTMPoint &from)
UTMPose(UTMPoint pt, const geometry_msgs::Quaternion &q)