Skip to content
Snippets Groups Projects
Commit b2c7b449 authored by Paul Riseborough's avatar Paul Riseborough Committed by Beat Küng
Browse files

drivers: Prevent duplicate reporting of GPS heading

parent 3ff8cd33
No related branches found
No related tags found
No related merge requests found
......@@ -882,6 +882,11 @@ GPS::publish()
if (_instance == Instance::Main || _is_gps_main_advertised) {
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance,
ORB_PRIO_DEFAULT);
if (_mode == GPS_DRIVER_MODE_ASHTECH) {
// Heading/yaw data can be updated at a lower rate than the other navigation data.
// The uORB message definition requires this data to be set to a NAN if no new valid data is available.
_report_gps_pos.heading = NAN;
}
_is_gps_main_advertised = true;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment