I see that TinyGPS++ library extracts time information from GxRMC and GxGGA NMEA sentences streamed by GPS receiver. However, in my experiments I observed that both of my GPS receivers generate GxRMC sentences with time data in them at least once a second even when they have no access to satellites.

I presume that the time data comes from the internal clock of the receiver (and is maintained between warm startups). This is perfectly OK. However, I would like to know what measures are required by NMEA specification to ensure the reliability of this time data.

Am I correct in assuming that the device itself is supposed to understand that after certain period of time its internal clock will diverge? And that after that period the device will by itself stop pumping out these GxRMC sentences, until it gets a chance to see a satellite and re-sync its internal clock? Or should I expect to see the next field in GxRMC sentence to change from A to V?

If not, then what is the proper way to ensure that I receive "satellite time" (or close to that) or nothing at all?

1 Answer 1


Most of the GPS modules keep on sending the data in the NMEA format whether they have a GPS fix or not, however, you can parse the GPS data to find whether the data is the latest data received from the GPS or not. If you look at the definition of the NMEA data here, there are a few variables in the data that you can use to find whether the data is the latest data from the GPS or not.

You can use the "Fix Quality" in GPGGA as well as "Validity/Receiver warning" in GPRMC for your module. The tinyGPS indeed has both of these variables being parsed.

In the tinyGPS library, if _gps_data_good is true then the data coming from the GPS module is the latest data it received from the GPS satellites. The program uses either the fix or validity to determine this (Refer to the library here and here).

You should just keep checking this variable to find whether the current data is the latest from the GPS or is it being calculated internally.

  • Yes, thank you. Indeed, I just noticed that the warning field in GPRMC/GNRMC messages changes between A and V. When there's no fix, the time is reported with V (unreliable). Moreover, after a relatively long while without access to satellites, my receiver stops reporting time in GxRMC sentences entirely - the time field is left empty. Commented Oct 9, 2019 at 17:22
  • It is interesting that in this state, after partial exposure to open sky (e.g. just one or two satellites visible, no fix), the receiver again begins reporting time in GxRMC, but with V label (unreliable). At first sight, this is strange, since the time information in this case is apparently received from the satellites. V changes to A only when position fix is achieved, which is overkill in my case (I don't need position, just time). Commented Oct 9, 2019 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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