Closed horverno closed 1 year ago
Swiftnaw provides GPS time in msec + nsec_residual basis, but the standard ROS time is sec + nsec. Conversion is needed.
msec
nsec_residual
sec
nsec
https://swift-nav.github.io/libsbp/c/build/docs/html/structsbp__gps__time__t.html
time_msg->time_ref.sec = time_gps.tow; // TODO - It is not sec: GPS time of week rounded to the nearest millisecond [ms] time_msg->time_ref.nsec = time_gps.ns_residual; // TODO - It is not nsec: Nanosecond residual of millisecond-rounded TOW
https://github.com/szenergy/duro_gps_driver/blob/ac53808d67c2e45e08247716ef20e3c5e08f417e/src/duro.cpp#L257
Swiftnaw provides GPS time in
msec
+nsec_residual
basis, but the standard ROS time issec
+nsec
. Conversion is needed.https://swift-nav.github.io/libsbp/c/build/docs/html/structsbp__gps__time__t.html
https://github.com/szenergy/duro_gps_driver/blob/ac53808d67c2e45e08247716ef20e3c5e08f417e/src/duro.cpp#L257