From c5a3b1b134d0cf4409c5e2572533bd06a734ff9c Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Mon, 18 Apr 2016 09:34:29 -0700 Subject: [PATCH] Plane: non-functional change - change labels for approach flight stage criteria --- ArduPlane/ArduPlane.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index aa6b01c095..8bf201ea6a 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -927,10 +927,10 @@ void Plane::update_flight_stage(void) } else if (auto_state.land_pre_flare == true) { set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_PREFLARE); } else if (flight_stage != AP_SpdHgtControl::FLIGHT_LAND_APPROACH) { - float path_progress = location_path_proportion(current_loc, prev_WP_loc, next_WP_loc); bool lined_up = abs(nav_controller->bearing_error_cd()) < 1000; 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) { + if ((auto_state.wp_proportion > 0.15 && lined_up && below_prev_WP) || + (auto_state.wp_proportion > 0.5f)) { set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_APPROACH); } else { set_flight_stage(AP_SpdHgtControl::FLIGHT_NORMAL);