> Assuming you compute an epoch from the NMEA date, I think there are several
> If gpsd build epoch == NMEA epoch: simple case, use it
> if gpsd epoch < NMEA epoch:
> new NMEA, use future epoch from NMEA
> if gpsd epoch > NMEA epoch:
> old NMEA lies, bump epoch from NMEA (maybe multiple times)
There is (at least) one more
interesting case that should probably be
mentioned in this area. Suppose both your gpsd and NMEA device were built at
roughly the same time and you are now using them (much) more than 20 years
after that. The epochs will match but be wrong. I don't see any way to
catch that problem without using something like the time from the OS/ntp or
some data from the file system.
Variations are that the time is more than 20 years past the most recent
build-date of either gpsd or NMEA.
It's probably possible to explain this mess with a time-line story and some
graphics. Suppose gpsd was built at time X and is using a NMEA device built
at X-5. Between X and X+15, both agree on the epoch. At X+16, gpsd will
start correcting for an old NMEA device. At X+20, that correction breaks.
(I'm being sloppy when using 20 years as the length of an era, but it's a
number and it's pretty close.)
These are my opinions. I hate spam.