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.
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.
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.