Dawn of the Second Epoch

Or, 10 bits should be enough for anybody:

GPS used a 10 bit field to encode the week number in each GPS time message, which means that a maximum of 1,024 weeks (19.7 years), could be handled. Each of these periods is known in GPS terms as an "epoch".

The first GPS satellites went live on 6 January 1980, meaning that the first epoch of GPS time lasted until 21 August 1999. We are now nearing the end of the second epoch, which will fall on the 6 April 2019. That means from that date onwards, we are likely to start seeing rollover problems in GPS receivers that aren't programmed to cope with the week number reset.

One of the things that makes this issue different from the Millennium Bug is that the impact won't necessarily be felt on rollover day itself. In fact, it's much more likely that an affected receiver won't start outputting erroneous data until long after the 6 April 2019.

That's because many receiver manufacturers have sought to maximise the default lifespan of their receivers by implementing the 1,024-week limit from the date the firmware was compiled, rather than from the date the current GPS epoch began.

In effect this means that older GPS receivers will operate normally for almost 20 years before problems begin to occur -- and if firmware is implemented in this manner, no issue is likely to be seen when the GPS epoch changes.

Correction, 13 bits should be enough for anybody:

The GPS modernization program is an ongoing, multibillion-dollar effort to upgrade the features and overall performance of the Global Positioning System. The upgraded features include new civilian and military GPS signals. To improve the situation regarding Week Number Roll Over, message types (CNAV and MNAV) use a 13-bit field to represent the GPS week number and newer GPS receivers that utilise that 13-bit field will not have a problem with 1,024-week epochs.

Previously, previously, previously, previously, previously, previously, previously.

Tags: , , , , ,

14 Responses:

  1. MattyJ says:

    Does that mean 8192 week epochs? I'm dum.

    • Yup.

      I am not an expert in this topic, and I didn't see any "why" in that article, but I'd hope there's some meaningful reason it can't be a variable-length field. Possibly, if it's part of what gets transmitted between back and forth between sats and receivers, so keeping the size down really does matter?

      And, I mean, 157.53 years is a long time. The US Civil War was just starting 157.53 years ago.

      • Nick Lamb says:

        Not "back and forth". Ordinary receivers don't send anything. They're just receiving, and thinking about what they can "hear" and figuring out where they are from that.

        The satellites transmit a 50 bit per second channel with data all system users need to operate the system (which birds are working as expected, roughly where in the sky they will be, and then the exact orbital parameters for the specific satellite transmitting so you can work out where it is now). So that's 3000 bits per minute, and each minute the system is repeating that 10 second week-of-epoch value twenty times, so 200 bits. You can see why back in 1973 they weren't keen to choose, say, 16 bit week-of-epoch instead.

        In 2018 most users are getting all that data from the Internet, since that's much faster than 50 bits per second (cue jokes about your terrible cellular service) but the whole point of GPS is that it stands alone, so a receiver that can't get that data anywhere else still needs to bootstrap entirely from that 50 bit per second channel. More commonly if you stray out of mobile coverage your device will gradually update itself from all the satellites it can see at once, learning new things at 50 bits per second per bird, but relying on the last feed from the Internet for everything else. If you leave it "on" and listening for at least an hour per day with a view of the sky it'll stay able to navigate more or less instantly.

        The replacement civilian navigation data will be 100 bits per second with 13 bit week numbers. So it's twice the bandwidth and somewhat less than twice the data used for timestamps, leaving more for other things.

        • Thank you!

          Because this is the Internet post-1998, I guess I should clarify: that's genuine, not sarcastic. Stupidest timeline.

          None of those are numbers I couldn't have researched on my own time, but that's the first expression of it I didn't zone out of.

          But: making a presumptive leap that you can (and give even ½ a shit to do so here, which you needn't, of course) speak to this too: how do sat phones actually function? I mean, even beyond the tangible delay I know they have (well, had a decade ago, but I figure this hasn't changed much… oh, unless the handsets are now doing in-device audio compression/decompression? Probably not because that'd break if you called a "normal" phone?), how do they still manage to have better audio reproduction than mobile phones on cellular networks and Skype (latter: joke, a bit)? Is it just that they go ahead and move all the bits, fuck the delay? Does that mean that if N handsets are talking to the same bird, then the quality is X bits/N? Is X also 50/100 in that context?

          Also (tangentially related) you are @NickelNickel, right? (I've thought about asking this before, but the context isn't ever quite right, so fuck it. Fwiw, I'm 0x6772—because "gr" is apparently "too short" a lot of places, or in that case because it was already taken… but I'm mostly boring, and I'm dumb about stuff. I don't think we've ever met in person, but still.)

          • s/then the quality is/then the delay is increased relative to/

          • Nick Lamb says:

            Last things first, I'm not @NickelNickel, I am tialaramex, but at some point it seemed JWZ's blog preferred people to give "real" names (some sort of terrible irony is doubtless involved) and I am informed that even though tialaramex is a much better name it's not "real" enough for most people.

            I think your whole thrust with the sat phone thing is based on some more fundamental mis-understanding. There are two basic kinds of satellite phone, but neither kind involves the Global Positioning System except in the sense that like many other phones the units might happen to use GPS to tell their user the time and/or where they are. The messages, frequencies used and bandwidth available for any satellite phone system are completely unrelated to GPS. You might as well ask about cellular phones, or the teletype, or any other unrelated technology.

            Having better audio than your smartphone is trivial. A smartphone is not really a phone, or only barely. The whole "phone" label is like when we called automobiles the "horseless carriage". We couldn't wait around while consumers figure out that "Oh, actually a tiny computer that's connected to the Network is exactly what I want, I would carry one of those everywhere". So we told them it's a better phone, they bought one from the phone store, then they "discovered" that they don't care about making telephone calls. If marketing felt that feigning surprise at this outcome was appropriate then I'm sure that's what we did.

            The way to make the audio better (if anybody cared, which they really, really don't) is mostly through hardware changes to prioritise audio fidelity at both ends. "Don't make the phone basically a rectangular piece of glass" would probably be the first piece of advice they'd get on that front, which of course they would ignore. You can also do a better job of implementing the loss replacement algorithms in your audio codec - replacing lost milliseconds with noise instead of silence makes a big difference to the perceived quality, and the precise kind of noise matters. IIRC Nokia has a bunch of relevant patents, which may even have expired by now because I am an old man and somehow this is 2019 already, but either way it isn't considered important.

  2. Leigh Klotz says:

    I got hit by this in the Thunderbolt GPS Disciplined Oscillator I use for NTP and 10MHz reference, and fixed it in the rollover code in the NTP driver Ralph Smith wrote. Here's TvB explaining the intricacies: https://time-nuts.febo.narkive.com/YdehJ9qv/trimble-thunderbolt-no-longer-determines-the-correct-date#post23

  3. Marcos Dione says:

    If 10 bits gives you 20 years span, the 13 should give 160 years. If you're using 160 years old tech, you have other problems besides not getting a fix.

    • jwz says:

      Narrator: They had other problems.

    • M.E. says:

      Year: 2189
      Location: Neo-Berkeley, Neo-CA, Neo-North-America

      Prelude:
      The Neo-Troubles have obliterated the technological base of the former western world. Out of death and fire, a small band of humans has survived. Through a combination of handed-down practical knowledge and a heaping dose of superstition, they have held on to the vestiges of The Long 60s. But now a new disaster looms. Having lost access to space, they can no longer control or maintain their GPS satellites. As the clock runs down, one sage who has learned the tradition of the Old Ways must warn everyone before it is Too Late.

      (The whine of a small combustion engine builds in the background)

      Humanity does not believe it. Humanity does not want to believe it. They really don't give a fuck. But their fate rests in the hands of...

      (A man in a long trenchcoat on what is clearly an ICE-modified Bird scooter rolls across the dusty plain)

      The Last Timekeeper

      • db48x says:

        Nice, but the timeline is wrong. Without continuous maintenance, the GPS system would be completely useless within a few years, not a century. Even things like cold fronts refract the signals enough to to throw off the accuracy. The satellites themselves last less than a decade too.

        • Nick Lamb says:

          Mmm. The position system would be broken after a few hours. GPS satellites don't actually know inherently where they are, we have very expensive ground stations (whose positions we know exactly) and those measure where the satellites are and create the ephemeris data used to drive the system. A device will consider that data expired after four hours, and even if you overrode that somehow I doubt it's much use after a day or three.

          But the post was talking about the time not location. Each satellite does inherently know the local time, and local time aboard those satellites is very similar to local time here, even after years of disuse the accuracy is probably better than you're going to get with a stick and some marks on a rock and obviously the precision is unparalleled.

  4. Ben says:

    Kinda serendipitous that a 10-bit week field for GPS makes for almost the same epoch length as the 235-month Metonic cycle, which was used in a much earlier era of navigational and astronomical calculations.

  • Previously