From 3edf304e557765ca16cfc5e30a58ffc42ad5856d Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 10 Feb 2016 08:38:03 +0100 Subject: [PATCH] EKF2: Fix home altitude reporting --- src/modules/ekf2/ekf2_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 28ac8cbb5e..14687ebcad 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -496,7 +496,7 @@ void Ekf2::task_main() global_pos.lat = est_lat; // Latitude in degrees global_pos.lon = est_lon; // Longitude in degrees - global_pos.alt = -pos[2]; // Altitude AMSL in meters + global_pos.alt = -pos[2] + lpos.ref_alt; // Altitude AMSL in meters global_pos.vel_n = vel[0]; // Ground north velocity, m/s global_pos.vel_e = vel[1]; // Ground east velocity, m/s