mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
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) {
|
} else if (auto_state.land_pre_flare == true) {
|
||||||
set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_PREFLARE);
|
set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_PREFLARE);
|
||||||
} else if (flight_stage != AP_SpdHgtControl::FLIGHT_LAND_APPROACH) {
|
} 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 lined_up = abs(nav_controller->bearing_error_cd()) < 1000;
|
||||||
bool below_prev_WP = current_loc.alt < prev_WP_loc.alt;
|
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);
|
set_flight_stage(AP_SpdHgtControl::FLIGHT_LAND_APPROACH);
|
||||||
} else {
|
} else {
|
||||||
set_flight_stage(AP_SpdHgtControl::FLIGHT_NORMAL);
|
set_flight_stage(AP_SpdHgtControl::FLIGHT_NORMAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user