VEHPI-28: Timestamp conversion is broken

Issue Information

Issue Type: Bug
Priority: Major
Status: In Progress

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: VehManPi (VEHPI)
Resolution: Unresolved
Target version: 1.0,
Components: GPS ,

Created: 2013-12-26 13:14:18
Time Spent Working

Not looked into why yet, but when the JourneyRecorder converts a time to epoch, the timestamp is for a date in 1994.

Issue Links

Toggle State Changes


Appears to be working again now.
Looking at the raw data, the GPS was reporting a date in 1994. Not entirely sure why
btasker changed status from 'Open' to 'In Progress'
As part of the field testing in VEHPI-30, a recurrence of this issue was found. Dates for an entire track segment covering 75 miles are in 1994.

Have a theory of the cause;

When the Pi was booted it would have been unable to contact an NTP server as no connectivity was available. No NTP servers would have been available during the drive, and so the system clock was probably used for conversion.

If this is the root cause, then the solution might simply be to take the GPS date as it's provided on the wire and use that rather than converting to Epoch. There's very little that it's likely to impact.
A fix has been implemented in VEHPI-12, will have to wait and see whether it resolves this issue
The fix in VEHPI-12 doesn't appear to have resolved this issue - the 1994 dates are definitely coming from the GPS. Timestamps generated by the system (such as those used in the Journeys segment) are correct, but those taken directly from the GPS are not. makes for interesting reading. Doesn't really answer the question, but interesting reading
A temporary solution might be to use the system time for now, though it's going to lead to some inaccuracies. It also raises the question of how accurate some of the other calculations are (speed etc).
Temporary fix introduced in commit 4a25a3b - The GPS fix data is amended to use a timestamp generated from the system time. Far from ideal, but should prevent this from happening whilst a better fix is found