From fdf6a8c1ddf5284094d5aded5271568f44954b63 Mon Sep 17 00:00:00 2001 From: rliou2000 Date: Tue, 11 Feb 2025 16:02:23 +0800 Subject: [PATCH] Update AP_GPS_UBLOX.cpp Patch "unhealthy GPS" warning on LOCOSYS RTK_DUAL driver --- libraries/AP_GPS/AP_GPS_UBLOX.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libraries/AP_GPS/AP_GPS_UBLOX.cpp b/libraries/AP_GPS/AP_GPS_UBLOX.cpp index f4b665b7cdbb95..392030b51a2700 100644 --- a/libraries/AP_GPS/AP_GPS_UBLOX.cpp +++ b/libraries/AP_GPS/AP_GPS_UBLOX.cpp @@ -20,6 +20,8 @@ // #include "AP_GPS_UBLOX.h" +#define SUPPORT_LX_RTK_DUAL_PATCH 20240314_20250211_unhealth_gps_patch + #if AP_GPS_UBLOX_ENABLED #include "AP_GPS.h" @@ -1616,6 +1618,9 @@ AP_GPS_UBLOX::_parse_gps(void) static_cast(RELPOSNED::refObsMiss) | static_cast(RELPOSNED::carrSolnFloat); +#ifdef SUPPORT_LX_RTK_DUAL_PATCH + state.gps_yaw_configured = true; // ++ LXX YAW config patch 20221015 in MSG_RELPOSNED: ++ +#endif _check_new_itow(_buffer.relposned.iTOW); if (_buffer.relposned.iTOW != _last_relposned_itow+200) { // useful for looking at packet loss on links @@ -2279,6 +2284,21 @@ bool AP_GPS_UBLOX::is_healthy(void) const } #endif #if GPS_MOVING_BASELINE + +#ifdef SUPPORT_LX_RTK_DUAL_PATCH + if (gps._auto_config == AP_GPS::GPS_AUTO_CONFIG_DISABLE) { + // since GPS_AUTO_CONFIG =0 // _hardware_generation is not available + return true; + } +else if ((role == AP_GPS::GPS_ROLE_MB_BASE || + role == AP_GPS::GPS_ROLE_MB_ROVER) + && _hardware_generation == LX_RTK_DUAL) + return true; // in case GPS_AUTO_CONFIG enabled +#endif + + + + if ((role == AP_GPS::GPS_ROLE_MB_BASE || role == AP_GPS::GPS_ROLE_MB_ROVER) && !supports_F9_config()) {