From 018846fadf6c93143894ba08c5123567a192c268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 1 Mar 2017 10:15:55 +0100 Subject: [PATCH] ekf2_replay.msg: use timestamp instead of time_ref, remove unused time_usec_vel --- msg/ekf2_replay.msg | 3 +-- src/modules/ekf2/ekf2_main.cpp | 3 +-- src/modules/sdlog2/sdlog2.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/msg/ekf2_replay.msg b/msg/ekf2_replay.msg index 61f0d1d27d..6ca5c2ea0f 100644 --- a/msg/ekf2_replay.msg +++ b/msg/ekf2_replay.msg @@ -1,4 +1,4 @@ -uint64 time_ref # ekf2 reference time. This is a timestamp passed to the +# uint64 timestamp # ekf2 reference time. This is a timestamp passed to the # estimator which it uses a absolute reference. float32 gyro_integral_dt # gyro integration period in s float32 accelerometer_integral_dt # accelerometer integration period in s @@ -16,7 +16,6 @@ float32[3] magnetometer_ga # magnetometer measurement vector (body fixed NED) float32 baro_alt_meter # barometer altitude measurement in m uint64 time_usec # timestamp of gps position measurement in us -uint64 time_usec_vel # timestamp of gps velocity measurement in us int32 lat # Latitude in 1E-7 degrees int32 lon # Longitude in 1E-7 degrees int32 alt # Altitude in 1E-3 meters above MSL, (millimetres) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 88d05d8dc1..e2f1bf1bbb 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -1015,7 +1015,7 @@ void Ekf2::task_main() if (publish_replay_message) { struct ekf2_replay_s replay = {}; - replay.time_ref = now; + replay.timestamp = now; replay.gyro_integral_dt = sensors.gyro_integral_dt; replay.accelerometer_integral_dt = sensors.accelerometer_integral_dt; replay.magnetometer_timestamp = _timestamp_mag_us; @@ -1028,7 +1028,6 @@ void Ekf2::task_main() // only write gps data if we had a gps update. if (gps_updated) { replay.time_usec = gps.timestamp; - replay.time_usec_vel = gps.timestamp; replay.lat = gps.lat; replay.lon = gps.lon; replay.alt = gps.alt; diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index c36a0ae420..c618a005d5 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -1590,7 +1590,7 @@ int sdlog2_thread_main(int argc, char *argv[]) if (replay_updated) { log_msg.msg_type = LOG_RPL1_MSG; - log_msg.body.log_RPL1.time_ref = buf.replay.time_ref; + log_msg.body.log_RPL1.time_ref = buf.replay.timestamp; log_msg.body.log_RPL1.gyro_integral_dt = buf.replay.gyro_integral_dt; log_msg.body.log_RPL1.accelerometer_integral_dt = buf.replay.accelerometer_integral_dt; log_msg.body.log_RPL1.magnetometer_timestamp = buf.replay.magnetometer_timestamp; @@ -1611,7 +1611,7 @@ int sdlog2_thread_main(int argc, char *argv[]) if (buf.replay.time_usec > 0) { log_msg.msg_type = LOG_RPL2_MSG; log_msg.body.log_RPL2.time_pos_usec = buf.replay.time_usec; - log_msg.body.log_RPL2.time_vel_usec = buf.replay.time_usec_vel; + log_msg.body.log_RPL2.time_vel_usec = buf.replay.time_usec; log_msg.body.log_RPL2.lat = buf.replay.lat; log_msg.body.log_RPL2.lon = buf.replay.lon; log_msg.body.log_RPL2.alt = buf.replay.alt;