Plane: non-functional change - change labels for approach flight stage criteria

This commit is contained in:
Tom Pittenger 2016-04-18 09:34:29 -07:00
parent c238645e53
commit c5a3b1b134
1 changed files with 2 additions and 2 deletions

View File

@ -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);