3 ms·
Sorry, late response but... It's the first - the GPS modules used for these purposes decode the time and then generate a digital pulse on an output pin at the
by davidf560 7y ago
Sorry, late response but...
It's the first - the GPS modules used for these purposes decode the time and then generate a digital pulse on an output pin at the top of each second (this is called a 1PPS output). A hardware counter counts the cycles from a local oscillator between pulses. The count between pulses is latched (this is all in hardware so far) and then the software reads the latched value. If your local reference oscillator is supposed to be 10MHz, your counter should report 10,000,000 ticks exactly. If it's high or low, the software can adjust the temperature of a little mini-oven that the oscillator resides in to speed it up or slow it down (some oscillators just use a voltage to speed up or slow down instead of an oven). Usually this is done in a PID loop or similar feedback loop. At this stage you can apply some filtering logic to help ride out certain errors (if you're suddenly off by 50% something else is probably wrong, etc.).
To ensure the GPS timing is as accurate as possible, you can have the GPS module survey its position for a lengthy period of time (since it is presumably mounted on an antenna mast somewhere and not moving) and average it out to establish a more accurate well-known location. The GPS can then use that known location to apply a correction to the GPS signals. Basically, if it's currently-computed position based on GPS signals is 50 meters away from the true well-known location of the receiver, it can figure out how far off the timing computation is and adjust. This is mostly handled by the GPS module itself, and is probably even more automated and accurate now than when I worked on it ~15 years ago.
There's also ways to increase GPS accuracy using supplementary broadcasts that contain localized offset correction information, referred to as Differential GPS (DGPS) run by many groups including the US Coast Guard and a similar technology called WAAS (wide area augmentation system) run by the US FAA. The GPS we were using didn't have the capability to use those sources but modern units probably do.