set relative altitude to false when using the feedback for the landing waypint

This commit is contained in:
Andreas Antener
2016-02-06 21:58:18 +01:00
parent baa11e357d
commit 20ef3adb1f

View File

@@ -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 */