vehicle_odometry: add timestamp_sample field for latency monitoring

This commit is contained in:
Mohammed Kabir
2020-04-28 13:58:43 -04:00
committed by Daniel Agar
parent ccaa103164
commit 5ffe88672e
9 changed files with 26 additions and 15 deletions
+4 -2
View File
@@ -1169,7 +1169,7 @@ void Ekf2::Run()
}
// use timestamp from external computer, clocks are synchronized when using MAVROS
ev_data.time_us = _ev_odom.timestamp;
ev_data.time_us = _ev_odom.timestamp_sample;
_ekf.setExtVisionData(ev_data);
ekf2_timestamps.visual_odometry_timestamp_rel = (int16_t)((int64_t)_ev_odom.timestamp / 100 -
@@ -1230,7 +1230,9 @@ void Ekf2::Run()
vehicle_odometry_s odom{};
lpos.timestamp = now;
odom.timestamp = lpos.timestamp;
odom.timestamp = hrt_absolute_time();
odom.timestamp_sample = now;
odom.local_frame = odom.LOCAL_FRAME_NED;