gz-bridge: use correct prev_timestamp for dt calc

- with the addition of the navsat plugin in PR#22638, the callback would
reassign the previous timestamp used in the calculations of the
angular_velocity causing derivative type noise in the groundtruth
measurements
This commit is contained in:
henrykotze 2024-04-03 11:33:32 +02:00 committed by Daniel Agar
parent 0a867b5d1d
commit de9f3a3268

View File

@ -719,8 +719,6 @@ void GZBridge::navSatCallback(const gz::msgs::NavSat &nav_sat)
updateClock(nav_sat.header().stamp().sec(), nav_sat.header().stamp().nsec());
}
_timestamp_prev = time_us;
// initialize gps position
if (!_pos_ref.isInitialized()) {
_pos_ref.initReference(nav_sat.latitude_deg(), nav_sat.longitude_deg(), hrt_absolute_time());