From 20ef3adb1f3568127bc0bd48ce7b474fef711958 Mon Sep 17 00:00:00 2001 From: Andreas Antener Date: Sat, 6 Feb 2016 21:58:18 +0100 Subject: [PATCH] set relative altitude to false when using the feedback for the landing waypint --- src/modules/navigator/mission.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/navigator/mission.cpp b/src/modules/navigator/mission.cpp index 868918eb01..73da4a37cc 100644 --- a/src/modules/navigator/mission.cpp +++ b/src/modules/navigator/mission.cpp @@ -463,16 +463,19 @@ Mission::set_mission_items() * Ignoring waypoint altitude: * Set altitude to the same as we have now to prevent descending too fast into * the ground. Actual landing will descend anyway until it touches down. + * XXX: We might want to change that at some point if it is clear to the user + * what the altitude means on this waypoint type. */ float altitude = _navigator->get_global_position()->alt; if (pos_sp_triplet->current.valid) { altitude = pos_sp_triplet->current.alt; } + _mission_item.altitude = altitude; + _mission_item.altitude_is_relative = false; _mission_item.nav_cmd = NAV_CMD_WAYPOINT; _mission_item.autocontinue = true; _mission_item.time_inside = 0; - _mission_item.altitude = altitude; } /* we just moved to the landing waypoint, now descend */