waterlinked / blueos-ugps-extension

BlueOS Extension for Water Linked Underwater GPS
1 stars 2 forks source link

Suggestion: set time fields in GPS_INPUT #5

Open clydemcqueen opened 1 week ago

clydemcqueen commented 1 week ago

If this extension set the time fields in GPS_INPUT (time_week, time_week_ms), then the ArduPilot MAVLink tools would be able to estimate time for messages in the dataflash (BIN) logs.

See: https://www.ardusub.com/reference/data-logging.html "If GPS is available, the logs will be dated according to the GPS timestamp."

Without the timestamp, most tools report time from the UNIX epoch.

I notice that plot.ardupilot.org starts time at March 25, 2015 at 23:00 UTC for BIN logs.

Thanks, /Clyde

wlseb commented 3 days ago

Having a correct timestamp on dataflash-logs sounds like a useful feature.

GPS_INPUT https://mavlink.io/en/messages/common.html#GPS_INPUT has the right fields.

However the UGPS API https://demo.waterlinked.com/swagger/#/ does currently not expose the GPS-time, does it?

clydemcqueen commented 3 days ago

However the UGPS API https://demo.waterlinked.com/swagger/#/ does currently not expose the GPS-time, does it?

True. It would be great if the API provided GPS-time. But lacking that, the extension could use the Pi system time.

Our typical operation is to boot up the Pi on the boat and provide internet access, so the Pi clock is synchronized to network time before the dive starts. However, even in cases where the Pi clock is not synchronized it is probably still reasonable to use the Pi clock, as all other BlueOS systems (mavlink-router, mavlink-server, etc.) use it.