From b3b057699bb5c0736c8c3bb613982497c703ec01 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Thu, 2 Oct 2025 19:22:41 +0200 Subject: [PATCH] core: gps: skip active satellites with ID > 31 Some GPS modules can work on multiple systems at the same time. However, the current code has been written only for GPS and, consequently is not able to manage satellites with an ID greater than 32. This commit provides an hotfix until all the GPS code gets refactored an extended to support also GLONASS and Galileo. Signed-off-by: Silvano Seva --- openrtx/src/core/gps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openrtx/src/core/gps.c b/openrtx/src/core/gps.c index 4ab59fbe..1c245f7d 100644 --- a/openrtx/src/core/gps.c +++ b/openrtx/src/core/gps.c @@ -109,7 +109,7 @@ void gps_task(const struct gpsDevice *dev) gps_data.fix_type = frame.fix_type; for (int i = 0; i < 12; i++) { - if (frame.sats[i] != 0) + if (frame.sats[i] != 0 && frame.sats[i] < 31) { gps_data.active_sats |= 1 << (frame.sats[i] - 1); }