From 39f83c91b34b72784596dcd8c1ec399be76a2ab1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 19 Sep 2023 16:08:59 +1000 Subject: [PATCH] AP_GPS: allow GPS moving baseline rover at 3Hz users with busy CAN bus often get significiantly lower GPS rates on a moving baseline rover, preventing arming. This PR relaxes the required frame rate as the EKF is quite happy with 3Hz yaw and the yaw is the only data consumed from a moving baseline rover --- libraries/AP_GPS/AP_GPS.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 7dadd145be..b3cfa29340 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -2065,12 +2065,14 @@ bool AP_GPS::is_healthy(uint8_t instance) const #else /* allow two lost frames before declaring the GPS unhealthy, but - require the average frame rate to be close to 5Hz. We allow for - a bit higher average for a rover due to the packet loss that - happens with the RTCMv3 data + require the average frame rate to be close to 5Hz. + + We allow for a rate of 3Hz average for a moving baseline rover + due to the packet loss that happens with the RTCMv3 data and the + fact that the rate of yaw data is not critical */ const uint8_t delay_threshold = 2; - const float delay_avg_max = ((_type[instance] == GPS_TYPE_UBLOX_RTK_ROVER) || (_type[instance] == GPS_TYPE_UAVCAN_RTK_ROVER))?245:215; + const float delay_avg_max = ((_type[instance] == GPS_TYPE_UBLOX_RTK_ROVER) || (_type[instance] == GPS_TYPE_UAVCAN_RTK_ROVER))?333:215; const GPS_timing &t = timing[instance]; bool delay_ok = (t.delayed_count < delay_threshold) && t.average_delta_ms < delay_avg_max &&