5

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?

Hassan
  • 53
  • 1
  • 3

1 Answers1

8

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.

SF.
  • 54,970
  • 12
  • 174
  • 343
  • I am getting your answer. Can you please explain why under 0.06s? I mean how you obtained this value? – Hassan Feb 08 '16 at 00:17
  • 2
    @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. – SF. Feb 08 '16 at 00:17
  • 2
    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. – SF. Feb 08 '16 at 00:25