mirror of https://github.com/ArduPilot/ardupilot
Plane: non-functional change - change labels for approach flight stage criteria
This commit is contained in:
parent
c238645e53
commit
c5a3b1b134
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue