Plane: fixed a condition where takeoff switches to land

This commit is contained in:
Andrew Tridgell 2015-10-24 15:15:59 +11:00
parent 537f22cdd1
commit 3dd47adafe

View File

@ -858,6 +858,8 @@ void Plane::update_flight_stage(void)
bool below_prev_WP = current_loc.alt < prev_WP_loc.alt;
if ((path_progress > 0.15f && lined_up && below_prev_WP) || path_progress > 0.5f) {
set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_APPROACH);
} else {
set_flight_stage(AP_SpdHgtControl::FLIGHT_NORMAL);
}
}