SignalK / signalk-java

Installer and web-app for the artemis-server (a java based Signal K master server)
Apache License 2.0
6 stars 6 forks source link

Running demo files cause timestamp issues #20

Closed rob42 closed 5 years ago

rob42 commented 5 years ago

When I run the demo file, then stop and restart the demo file (with NMEA0183 in this case) the RMC sentence (lat/lon) contains a timestamp, hence is converted to the signalk timestamp. So the navigation.position overwrites the position at that time (in the past). But COG doesnt have a timestamp, so it gets the current time.

Remember influx gets the latest timestamp for a given key.

When you run the demo the second time the boat position is the same as it was when the last run ended (eg the position with the highest timestamp). The COG etc works as expected. Eventually your demo catches up to the current position, and suddenly the boat moves on...

The demo data format or importing will need to be adjusted to bring sanity.

rob42 commented 5 years ago

Fixed by always making demo timestamp = current timestamp, in spite of navigation.systemTime in demo file. This avoids the random handling of NMEA date/nodate sentences.