From dd4213310ffe99f5517c1b4dbce552deee0330a7 Mon Sep 17 00:00:00 2001 From: Eurus <105340988+AkaiEurus@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:57:23 +0800 Subject: [PATCH] ekf2: fix published terrain reset delta (#27130) --- src/modules/ekf2/EKF2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index d84cec52c0..919d0f9a7f 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -1361,7 +1361,7 @@ void EKF2::PublishGlobalPosition(const hrt_abstime ×tamp) float delta_hagl = 0.f; _ekf.get_hagl_reset(&delta_hagl, &global_pos.terrain_reset_counter); - global_pos.delta_terrain = -delta_z; + global_pos.delta_terrain = -delta_hagl; #endif // CONFIG_EKF2_TERRAIN global_pos.dead_reckoning = _ekf.control_status_flags().inertial_dead_reckoning