[gps] don't configure SBAS integrity flag with UBX ucenter

With this flag, only GPS with valid integrity data is used, which is
greatly limiting the number of satellites actually used, and a much
lower precision in the end.
This commit is contained in:
Gautier Hattenberger
2026-03-20 23:42:07 +01:00
parent 618355b9b7
commit bbb6eda3c5

View File

@@ -419,6 +419,10 @@ static inline void gps_ubx_ucenter_config_nav(void)
#define GPS_UBX_UCENTER_RATE 0x00FA // In milliseconds. 0x00FA = 250ms = 4Hz
#endif
#ifndef GPS_UBX_UCENTER_SAVE
#define GPS_UBX_UCENTER_SAVE TRUE // try to save conf by default
#endif
static inline void gps_ubx_ucenter_config_port(void)
{
switch (gps_ubx_ucenter.port_id) {
@@ -458,7 +462,7 @@ static inline void gps_ubx_ucenter_config_port(void)
#define GPS_SBAS_RANGING 0x01
#define GPS_SBAS_CORRECTIONS 0x02
#define GPS_SBAS_INTEGRITY 0x04
#define GPS_SBAS_INTEGRITY 0x04 // If enabled, the receiver will only use GPS satellites for which integrity information is available (not recommended)
#define GPS_SBAS_MAX_SBAS 3 // Default ublox setting uses 3 SBAS channels(?)
@@ -467,7 +471,7 @@ static inline void gps_ubx_ucenter_config_port(void)
static inline void gps_ubx_ucenter_config_sbas(void)
{
// Since March 2nd 2011 EGNOS is released for aviation purposes
UbxSend_CFG_SBAS(gps_ubx_ucenter.dev, GPS_SBAS_ENABLED, GPS_SBAS_RANGING | GPS_SBAS_CORRECTIONS | GPS_SBAS_INTEGRITY,
UbxSend_CFG_SBAS(gps_ubx_ucenter.dev, GPS_SBAS_ENABLED, GPS_SBAS_RANGING | GPS_SBAS_CORRECTIONS,
GPS_SBAS_MAX_SBAS,
GPS_SBAS_AUTOSCAN, GPS_SBAS_AUTOSCAN);
}
@@ -612,8 +616,10 @@ static bool gps_ubx_ucenter_configure(uint8_t nr)
break;
#endif
case 22:
#if GPS_UBX_UCENTER_SAVE
// Try to save on non-ROM devices...
UbxSend_CFG_CFG(gps_ubx_ucenter.dev, 0x00000000, 0xffffffff, 0x00000000);
#endif
break;
case 23:
UbxSend_MON_GET_GNSS(gps_ubx_ucenter.dev);