Description
What we should not do is say getTimestamp(var)
is not actually the timestamp.
Perhaps we should rename .nstime
field to: variable.missionnanosec
as part of DFG v1. The suggested comments in code here already support both ("mission time" and ROS standard) cases where the full mission time is in the nanosecond
field, or is split with the timestamp
field.
This way the poweruser would know that timestamp
and missionnanosec
are equivalent. They can then have different start times also, namely actual calendar datetime+timezone
, and 0ns
. They can then be made equivalent with
datetime2unix(timestamp[1]) + missionnanosec*1e-9
but this sum is the really large number where Float64 risk of precision occurs. That would be in line with DateTime
being millisecond only.
We should obviously be using Float64 for this, so don't mind ROS' use of Float32. Remember also that much of the web still uses 32 for many of its workings.
The suggested missionnanosec
approach seems to solve all the problems?
Originally posted by @dehann in JuliaRobotics/RoME.jl#747 (comment)