In Android development (latest SDK) I am using the GpsStatus.NmeaListener
to parse NMEA messages for time synchronization.
In the onNmeaReceived(long timestamp, String nmea)
callback I parse the nmea string for GPRMC messages. I then calculate the offset between the system clock and the time parsed from the GPRMC message.
Now there is a delay between the moment in time the NMEA message was received in the Android Frame work and the handling of the callback. This would cause a variation in the actual offset that I am calculating.
My guess is that the timestamp
that is send along the NMEA message is the system clock time of the moment that the NMEA message was received. If this is true, I can use this timestamp to compensate for the latency in the callback handling.
From my measurements, the timestamp
time has a difference from the System clock time captured in the onNmeaReceived
callback of approx 10 ~ 30 ms.
The difference/offset between the time between the timestamp
and the time derived from the parsed GPRMC message is in the order of 7200092ms (2hours difference between GPS and system time).
Therefore I would say the timestamp
is not the GPS-based time but the system clock time when the message was received.
I have searched the web for quite a bit but I can not seem to locate any information regarding this timestamp. Does anyone have a resource that tells us more about this timestamp? What exactly does this timestamp represent? At what moment in time is it recorded?