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.
In data model, an example is given to count the number of satellites for each GNSS:
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