From 383070b9c058014b7a7970dbc78b9d7951941091 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 25 Jul 2014 11:40:26 +1000 Subject: [PATCH] AP_NavEKF: ensure get_position() fills in flags --- libraries/AP_NavEKF/AP_NavEKF.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index 5cc89e34cb..01492e04fb 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -2807,6 +2807,8 @@ bool NavEKF::getLLH(struct Location &loc) const loc.lat = _ahrs->get_home().lat; loc.lng = _ahrs->get_home().lng; loc.alt = _ahrs->get_home().alt - states[9]*100; + loc.flags.relative_alt = 0; + loc.flags.terrain_alt = 0; location_offset(loc, states[7], states[8]); return true; }