8 ms·
The GPS system uses 10 bits for the week number part of the broadcast timestamp. This causes a rollover [1] every 19.6 years, and devices that aren't designed t
by andyjohnson0 4y ago
The GPS system uses 10 bits for the week number part of the broadcast timestamp. This causes a rollover [1] every 19.6 years, and devices that aren't designed to anticipate it will report the current date/time as being two decades (or multiples of that) in the past.
I guess the ultimate cause is data framing in the transmission protocol. The timestamp contains the number of weeks since 00:00:00 1980-01-06, together with the number of seconds since the start of the current week. The number of seconds in a week won't fit into 16 bits, so my supposition is that the designers had to also use some of the bits that could otherwise have been used for a wider week counter.
I'd like to think that nowadays we'd use self-describing, upgradeable protocols. But GPS was designed in the 70s for the constrained technology of that era. And I'm pretty sure nobody anticipated how widely deployed it would be 45+ years later.
[1] https://en.m.wikipedia.org/wiki/GPS_week_number_rollover https://en.m.wikipedia.org/wiki/GPS_week_number_rollover
- GekkePrutser 4y ago> I'd like to think that nowadays we'd use self-describing, upgradeable protocols. That would open a whole new can of security worms though. Being able to modify a protocol in-band is something we're starting to move away from. Things are becoming more static as a precaution, like stored procedures on SQL so an attacker can't inject a change.
- ezconnect 4y agoStored procedure was the norm when I was a young programmer. Dynamic SQLs are recent and was the cause of SQL injection vulnerabilities.
- toyg 4y ago> And I'm pretty sure nobody anticipated how widely deployed it would be 45+ years later. Or maybe they thought by now we would have replaced it with something better. Spacefaring was still riding high in the '70s, the brakes were only applied after '89 (sadly one of the many indirect effects of glasnost, RIP Gorbachev).
- LukeShu 4y agoGPS was originally only for military use; opening it up to civilians didn't come until later. They didn't anticipate all of us pesky civilians coming up with creative new uses for it (like time keeping in our networks) or putting it in millions of devices that don't have strict maintenance schedules.
- defrost 4y agoYou've missed two key points: * GPS depends upon acurate timing and positions. * GPS broadcasts a data packet. The length of the packet is limited by the broadcast frequency and the time to update .. so the packet was kept tight. The satellites drift (orbital decay, magnetic torque, solar wind, random particle pressure) and live in a different gravity (aka relativistic time) .. their 'self' data (position | time) is regularly updated from ground stations and their internal epochs only need to operate for some low N number of expected update cycles .. if they lack an accurate sense of 'self' they lack function as waypoints. Adding clock data widths that count nanoseconds for the lifetime of the sun would be pointless: it makes the data packet longer and it doesn't change the hard requirement for regular time|position updates from the ground. They were designed with short epoch counters with an understanding of functional constraints.
- usrusr 4y agoStill surprised, every time I see it mentioned, to have a cultural construct like a week in the data model. Likely a deliberate break from SI to avoid ambiguity between monotonously increasing counters and calendaric time, but surprising nonetheless.
- withinboredom 4y agoThey were fighting the good fight of whether a week begins on Sunday or Monday… /s
- deleted 4y ago[deleted]