From 0f3378e1940d4c008e2aa27f0ea1bdeef599a354 Mon Sep 17 00:00:00 2001 From: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)> Date: Thu, 16 Nov 2023 15:29:36 +0100 Subject: [PATCH] ekf2: fix terrain range finder logging --- src/modules/ekf2/EKF/terrain_estimator.cpp | 2 +- src/modules/logger/logged_topics.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF/terrain_estimator.cpp b/src/modules/ekf2/EKF/terrain_estimator.cpp index 19e12d8f75..12f7c56985 100644 --- a/src/modules/ekf2/EKF/terrain_estimator.cpp +++ b/src/modules/ekf2/EKF/terrain_estimator.cpp @@ -239,7 +239,7 @@ void Ekf::updateHaglRng(estimator_aid_source1d_s &aid_src) const aid_src.timestamp_sample = _time_delayed_us; // TODO - aid_src.observation = pred_hagl; + aid_src.observation = meas_hagl; aid_src.observation_variance = obs_variance; aid_src.innovation = hagl_innov; diff --git a/src/modules/logger/logged_topics.cpp b/src/modules/logger/logged_topics.cpp index cdcb36080d..c403b81e70 100644 --- a/src/modules/logger/logged_topics.cpp +++ b/src/modules/logger/logged_topics.cpp @@ -291,6 +291,7 @@ void LoggedTopics::add_default_topics() add_optional_topic_multi("estimator_aid_src_mag", 0, MAX_ESTIMATOR_INSTANCES); add_optional_topic_multi("estimator_aid_src_optical_flow", 0, MAX_ESTIMATOR_INSTANCES); add_optional_topic_multi("estimator_aid_src_terrain_optical_flow", 0, MAX_ESTIMATOR_INSTANCES); + add_optional_topic_multi("estimator_aid_src_terrain_range_finder", 0, MAX_ESTIMATOR_INSTANCES); add_optional_topic_multi("estimator_aid_src_sideslip", 0, MAX_ESTIMATOR_INSTANCES); #endif /* CONFIG_ARCH_BOARD_PX4_SITL */