I'm currently having some fun with the gspd
library and noticed that the time I get switches between two values - The actual value (today) and some date in 1991.
When displayed gpsmon
it normally shows the right time. Using cgps -s
displays the wrong time, with the absurdly huge offset.
The (so far) only possible problem I've found online is that the sys-time isn't up to date which mixes up the gps-time, but that isn't the case here.
We are accessing gpsd
via the following code:
{
gps_stream(&gps_data, WATCH_ENABLE | WATCH_JSON, NULL);
if(gps_waiting(&gps_data, timeout)) {
if(gps_read(&gps_data) == -1) {
return false;
}
}
return true;
}
All the other values (location, altitude etc) are correct. Only the time is off.
Anybody got an idea on why this could be happening? Thanks in advance!