I have a GPS module which outputs NMEA messages at 1Hz. In the data sheet it is mentioned that at cold start, it will get a fix in 29s. I run it cold start and indeed it gets the fix in 29th second.

However in around 12 seconds, I start getting the time in the GPRMC and GPGGA and GPGLL. Also after a few more seconds I get the exact date in GPRMC.

How is it possible that without even a fix,(which is supposed to happen after complex calculations and we get time and lat/long value in 29s) I am getting this time and date?

Does everything is not calculated simultaneously?

  • 3
    $\begingroup$ See How does GPS receiver synchronize time with GPS satellites? $\endgroup$ – TildalWave Feb 7 '16 at 23:38
  • 1
    $\begingroup$ I have already seen that. But my question specifically is that how we get correct time and date before even getting a fix. $\endgroup$ – Hassan Feb 7 '16 at 23:58
  • 1
    $\begingroup$ How accurate is the time given? If it's only accurate to a modest fraction of a second, I don't see any reason it can't just be using the received time directly. $\endgroup$ – Nathan Tuggy Feb 8 '16 at 0:07
  • $\begingroup$ GPRMC,112510.10,V,,,,,,,,,,N*7A GPGGA,112510.10,,,,,0,00,99.99,,,,,,*61 GPGLL,,,,,112510.10,V,N*4D The next message has GPRMC,112511.00,V,,,,,,,,,,N*7A GPGGA,112511.00,,,,,0,00,99.99,,,,,,*61 GPGLL,,,,,112511.00,V,N*4D $\endgroup$ – Hassan Feb 8 '16 at 0:11

Each satellite broadcasts time. Only one is needed to determine the time with accuracy to distance to the satellite in light seconds - under 0.088s of error.

But you need at least three, preferably more satellites to get the location fix and the high-precision time (adjusted for distance from the satellite = time it takes for the signal to reach you.) As your GPS obtains more signals, it calculates its position (fix) and adjusts the clock, but the initial first broadcast is enough to establish timestamps on messages.

  • $\begingroup$ I am getting your answer. Can you please explain why under 0.06s? I mean how you obtained this value? $\endgroup$ – Hassan Feb 8 '16 at 0:17
  • 1
    $\begingroup$ @Hassan: 20200km in light seconds - orbital altitude of GPS satellites. Actually, correcting the value to 0.088s - 26571km when the satellite is at the horizon (distance = altitude + Earth radius). Anything more and it dips below horizon. Though you're likely to get the fix from the ones near zenith first; best signal, least obstructions. $\endgroup$ – SF. Feb 8 '16 at 0:17
  • 2
    $\begingroup$ Actually, I don't know the inner workings of a GPS receiver, but the error may be down to 0.028s - 0.06 is the shortest time, 0.088 is the longest so if the receiver adjusts the time by 0.074, it will be at worst +0.014/-0.014 error. $\endgroup$ – SF. Feb 8 '16 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.