27 mrpt::obs::gnss::Message_NMEA_GGA gga;
28 gga.fields.altitude_meters = msg.altitude;
29 gga.fields.latitude_degrees = msg.latitude;
30 gga.fields.longitude_degrees = msg.longitude;
32 switch(msg.status.status)
35 gga.fields.fix_quality = 0;
38 gga.fields.fix_quality = 1;
41 gga.fields.fix_quality = 2;
44 gga.fields.fix_quality = 3;
47 gga.fields.fix_quality = 0;
59 sensor_msgs::NavSatFix &msg)
62 msg.header = msg_header;
66 if (obj.hasMsgClass<mrpt::obs::gnss::Message_NMEA_GGA>())
68 const mrpt::obs::gnss::Message_NMEA_GGA &gga =
69 obj.getMsgByClass<mrpt::obs::gnss::Message_NMEA_GGA>();
70 msg.altitude = gga.fields.altitude_meters;
71 msg.latitude = gga.fields.latitude_degrees;
72 msg.longitude = gga.fields.longitude_degrees;
76 switch(gga.fields.fix_quality)
79 msg.status.status = -1;
82 msg.status.status = 0;
85 msg.status.status = 2;
88 msg.status.status = 1;
92 msg.status.status = 0;
95 msg.status.service = 1;
bool mrpt2ros(const CObservationGPS &obj, const std_msgs::Header &msg_header, sensor_msgs::NavSatFix &msg)
File includes methods for converting CNetworkOfPoses*DInf <=> NetworkOfPoses message types...
bool ros2mrpt(const sensor_msgs::NavSatFix &msg, CObservationGPS &obj)