Skip to content

Commit

Permalink
drivers: Always set GPS heading to NAN if not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough authored and bkueng committed Aug 28, 2018
1 parent b2c7b44 commit ad1c2b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/drivers/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit ad1c2b3

Please sign in to comment.