So I was reading about GNSS rollover and could not find all the answers online.
All satellites have atomic clocks for precise time keeping. They also have two counters - current week and seconds passed in the current week. The rollover is when the week counter overflows. Not all satellites are affected the same. Old GPS satellites use 10 bits for the week counter and rollover every ~20 years, while the new GPS satellites use 13 bits and therefore rollover only once ~160 years. I think I read somewhere that Galileo is also affected the same way.
The first question: why aren't all constellations prone to week number rollover? Information I read online was regarding GPS.
Moving on - about how time and location comes to our devices. The satellites send the current time and their position to a GNSS module. The GNSS module uses this raw data from multiple satellites to calculate its position and then forms a NMEA package with time, location and some other information and sends this to the device it's embedded on (a mobile phone or a tracker).
A rollover would cause incorrect time being sent to the GNSS module and in turn incorrect time in the NMEA package, right? But wouldn't rollover cause incorrect location calculation as well?
As I understand, a satellite uses time to calculate its own position, so wouldn't satellites calculate send their incorrect positons to the GNSS module? Further on, the GNSS module uses trilateration to calculate its location and the distance from the module to the satellites is based on time, so wouldn't this (the rollover) cause the GNSS module to calculate its position incorrectly too? Resulting in incorrect location being added to the NMEA package?
This is largely because I got curious and started digging in. But it's also about an issue we discussed at work - we get a NMEA package to our application. Will (after a rollover) only time be affected, or will other information be incorrect as well? This is assuming the GNSS module does not have some built-in protection, so we could prepare for a rainy-day scenario.
I thought of possible ways to test it out. However I see no way of faking the satellite data going to the GNSS module. And to fake NMEA I would already need to assume how will it be affected by the rollover.
Let me know if I got something wrong. All your help and answers are deeply appreciated.
Most grateful,
A junior embedded developer