Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible incorrect counting of GNSS satellites #154

Open
foakgul opened this issue Dec 1, 2021 · 0 comments
Open

possible incorrect counting of GNSS satellites #154

foakgul opened this issue Dec 1, 2021 · 0 comments

Comments

@foakgul
Copy link

foakgul commented Dec 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant