mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 20:13:33 +08:00
mission: be more intelligent about saying that we are on a mission landing
- previously the decision of being on a landing pattern was taken by just looking at the current mission index. However, even if the current mission index indicates a landing pattern the vehicle could be at an arbitrary location, far from being established on the pattern. Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -563,9 +563,14 @@ Navigator::run()
|
||||
|
||||
}
|
||||
|
||||
// if RTL is set to use a mission landing and mission has a planned landing, then use MISSION to fly there directly
|
||||
if (on_mission_landing() && !get_land_detected()->landed) {
|
||||
|
||||
if (!rtl_activated && _rtl.initialClimbDone() && get_mission_start_land_available()) {
|
||||
_mission.set_execution_mode(mission_result_s::MISSION_EXECUTION_MODE_FAST_FORWARD);
|
||||
|
||||
if (!getMissionLandingInProgress()) {
|
||||
start_mission_landing();
|
||||
}
|
||||
|
||||
navigation_mode_new = &_mission;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user