Skip to content

Commit

Permalink
gz-bridge: use correct prev_timestamp for dt calc
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
henrykotze committed Apr 3, 2024
1 parent 416b6a3 commit 16c0b41
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/modules/simulation/gz_bridge/GZBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 16c0b41

Please sign in to comment.