SlashDevin / NeoGPS

NMEA and ublox GPS parser for Arduino, configurable to use as few as 10 bytes of RAM
GNU General Public License v3.0
702 stars 195 forks source link

possible incorrect counting of GNSS satellites #154

Open foakgul opened 2 years ago

foakgul commented 2 years ago

In data model, an example is given to count the number of satellites for each GNSS:

// Count how satellites are being received for each GNSS
for (uint8_t i=0; i < gps.sat_count; i++) {
  if (gps.satellites[i].tracked) {
    if (gps.satellites[i] . id <= 32)
      GPS_satellites++;
    if (gps.satellites[i] . id <= 64)
      SBAS_satellites++;
    if (gps.satellites[i] . id <= 96)
      GLONASS_satellites++;
  }
}

For ids: 01 ~ 32 are for GPS 33 ~ 64 are for SBAS 65 ~ 96 are for GLONASS

The above code seems to assign ids <=32 to all three GNSS, ie to GPS, SBAS and GLONASS, ie if id=28 this will be counted toward GPS, SBAS and GLONASS which looks incorrect.

Thanks