From 8836be0f47b2162f022633f2954d42dc5854e811 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Wed, 23 Jul 2025 12:00:34 +1000 Subject: [PATCH] AG3335 GPS: Use NAVIC in India/Nepal, L1+L5 elsewhere. (#7413) As determined by @b8b8 , enabling NAVIC meant the more modern L5 GPS signal was not used (L1 GPS is always available). NAVIC, India's GNSS, probably provides the best coverage in India and the neighbouring region. However, outside of NAVIC's coverage area, L5 GPS is highly desirable. This patch amends the AG3335-family GPS configuration to enable L5 GPS coverage by default. If the Lora region is set to India or Nepal, NAVIC will be enabled instead. --- src/gps/GPS.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 3a6b19f64..f3624c627 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -643,8 +643,16 @@ bool GPS::setup() delay(250); } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_AG3335, GNSS_MODEL_AG3352)) { - _serial_gps->write("$PAIR066,1,0,1,0,0,1*3B\r\n"); // Enable GPS+GALILEO+NAVIC - + if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_IN || + config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_NP_865) { + _serial_gps->write("$PAIR066,1,0,1,0,0,1*3B\r\n"); // Enable GPS+GALILEO+NAVIC + // GPS GLONASS GALILEO BDS QZSS NAVIC + // 1 0 1 0 0 1 + } else { + _serial_gps->write("$PAIR066,1,1,1,1,0,0*3A\r\n"); // Enable GPS+GLONASS+GALILEO+BDS + // GPS GLONASS GALILEO BDS QZSS NAVIC + // 1 1 1 1 0 0 + } // Configure NMEA (sentences will output once per fix) _serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON _serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF