mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
set relative altitude to false when using the feedback for the landing waypint
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user