From ad1c2b31d112b0f930d4c7a39f2bfcfdcef32b4b Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Tue, 28 Aug 2018 20:47:25 +1000 Subject: [PATCH] drivers: Always set GPS heading to NAN if not updated --- src/drivers/gps/gps.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index 0bddce8fbd79..f0b255fc31f4 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -882,11 +882,9 @@ 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; - } + // 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; } }