Function mrpt::ros2bridge::fromROS(const gps_msgs::msg::GPSFix&, mrpt::obs::CObservationGPS&)

Function Documentation

bool mrpt::ros2bridge::fromROS(const gps_msgs::msg::GPSFix &msg, mrpt::obs::CObservationGPS &obj)

Convert gps_msgs/GPSFix -> mrpt::obs::CObservationGPS

This function populates multiple GNSS messages in the CObservationGPS object:

  • Message_NMEA_GGA: position, altitude, fix quality, HDOP, satellites

  • Message_NMEA_RMC: speed (converted from m/s to knots), track/direction

  • Message_NMEA_VTG: ground speed, track

  • Message_NMEA_GSA: DOP values (PDOP, HDOP, VDOP)

The covariance_enu field is also populated if the covariance type is known.

Returns:

true on successful conversion, false on any error.