diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index a3db120584..bbb58285f0 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1002,7 +1002,7 @@ void AP_GPS::send_mavlink_gps_raw(mavlink_channel_t chan) hacc * 1000, // one-sigma standard deviation in mm vacc * 1000, // one-sigma standard deviation in mm sacc * 1000, // one-sigma standard deviation in mm/s - 0, 0); // TODO one-sigma heading accuracy standard deviation + 0); // TODO one-sigma heading accuracy standard deviation } #if GPS_MAX_RECEIVERS > 1 @@ -1032,7 +1032,7 @@ void AP_GPS::send_mavlink_gps2_raw(mavlink_channel_t chan) ground_course(1)*100, // 1/100 degrees, num_sats(1), state[1].rtk_num_sats, - state[1].rtk_age_ms, 0); + state[1].rtk_age_ms); } #endif // GPS_MAX_RECEIVERS diff --git a/libraries/AP_GPS/AP_GPS_UAVCAN.cpp b/libraries/AP_GPS/AP_GPS_UAVCAN.cpp index 109ccf6212..8245f5a4a5 100644 --- a/libraries/AP_GPS/AP_GPS_UAVCAN.cpp +++ b/libraries/AP_GPS/AP_GPS_UAVCAN.cpp @@ -249,6 +249,15 @@ void AP_GPS_UAVCAN::handle_fix_msg(const FixCb &cb) interim_state.last_gps_time_ms = AP_HAL::millis(); _new_data = true; + if (!seen_message) { + if (interim_state.status == AP_GPS::GPS_Status::NO_GPS) { + // the first time we see a fix message we change from + // NO_GPS to NO_FIX, indicating to user that a UAVCAN GPS + // has been seen + interim_state.status = AP_GPS::GPS_Status::NO_FIX; + } + seen_message = true; + } } diff --git a/libraries/AP_GPS/AP_GPS_UAVCAN.h b/libraries/AP_GPS/AP_GPS_UAVCAN.h index f7b18310fd..a064254815 100644 --- a/libraries/AP_GPS/AP_GPS_UAVCAN.h +++ b/libraries/AP_GPS/AP_GPS_UAVCAN.h @@ -62,8 +62,6 @@ private: HAL_Semaphore sem; uint8_t _detected_module; - bool seen_message; - bool seen_message; bool seen_fix2; bool seen_aux; diff --git a/libraries/AP_GPS/AP_GPS_UBLOX.cpp b/libraries/AP_GPS/AP_GPS_UBLOX.cpp index 5aebf9b1be..d045179a86 100644 --- a/libraries/AP_GPS/AP_GPS_UBLOX.cpp +++ b/libraries/AP_GPS/AP_GPS_UBLOX.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BH