wellenvogel/esp32-nmea2000

my20220307: occasional time leaps on display and boatData

W-Geronius opened this issue · 2 comments

This issue was first seen on OBP60 display: see norbert-walter#18
Occasional time leaps (-1 hour) can be observed also on DATA tab, like this (taken within 30 seconds):
image
Examples extracted from api/boatDataString (previous to the screenshots) reveal a pattern:

GPST,formatTime,1,1938634,3,57726.02\n
2022-03-08 16:02:07        57727

GPSD,formatDate,1,1939659,3,19059\n
GPST,formatTime,1,1939705,3,57727.02\n
2022-03-08 16:02:09        57729

GPSD,formatDate,1,1941868,3,19059\n
GPST,formatTime,1,1941868,3,**54129**\n   **<--- time lapse !!!**
2022-03-08 16:02:10        57730

GPSD,formatDate,1,1942267,3,19059\n
GPST,formatTime,1,1942296,3,57730.02\n
2022-03-08 16:02:11        57731

GPSD,formatDate,1,1943274,3,19059\n
GPST,formatTime,1,1943297,3,57731.02\n
2022-03-08 16:02:12        57732

Whenever the value holds decimal places (always .02 !!), correct local time is displayed.
There is no pattern for decimal places missing, however, whenever they are absent UTC time is transmitted (and displayed).

Incoming GGA sentences look fine to me. See attached inputdata from OP, boatDataString capture and configuration.
errors at 16:00:55, 16:01:40, 16:01:51, 16:02:10, 16:02:33, ... and many more

[telnet 10.10.10.1] (2022-03-08_160016) raw OP out.log
localhost@OBP60-GetBoatData.txt
config20220208.txt

Your GLL data is jumping:
[2022-03-08 16:00:20] $GPGLL,5043.9058,N,00700.4837,E,160020.020,A3A
[2022-03-08 16:00:21] $GNGLL,5043.9058,N,00700.4837,E,150020.000,A,D
4D

The first record is wrong. All other times are around 15xxxx. And all the ones with 16xxxx have .02

The SignalK plugin signalk-to-nmea0183 was generating these exessive GLL sentences, holding local time in the UTC field. Unchecking GLL in the plugin solved the problem.