Skip to content

Commit

Permalink
Plane: added Q_ABRAKE_THR_PCT
Browse files Browse the repository at this point in the history
this allows the throttle to be set to a specific value during
airbraking to try to increase drag, potentially allowing for a shorter
landing distance
  • Loading branch information
tridge committed Sep 5, 2023
1 parent 26b7092 commit 00e200f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ArduPlane/quadplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,15 @@ const AP_Param::GroupInfo QuadPlane::var_info2[] = {
// @User: Standard
AP_GROUPINFO("RTL_ALT_MIN", 34, QuadPlane, qrtl_alt_min, 10),

// @Param: ABRAKE_THR_PCT
// @DisplayName: airbrake minimum throttle
// @Description: This sets the minimum throttle to use during the airbrake phase of a VTOL approach and landing. Raising this will allow for faster slowdown of the vehicle, allowing for landings over a shorter distance. A value of -1 means to run the VTOL controller to hold height.
// @Units: %
// @Range: -1 100
// @Increment: 1
// @User: Standard
AP_GROUPINFO("ABRAKE_THR_PCT", 35, QuadPlane, airbrake_thr_pct, -1),

AP_GROUPEND
};

Expand Down Expand Up @@ -2430,7 +2439,12 @@ void QuadPlane::vtol_position_controller(void)
const float stop_distance = stopping_distance() + 2*closing_speed;

if (!suppress_z_controller && poscontrol.get_state() == QPOS_AIRBRAKE) {
hold_hover(0);
if (airbrake_thr_pct >= 0) {
// user has asked for a specific throttle
hold_stabilize(airbrake_thr_pct.get() * 0.01);
} else {
hold_hover(0);
}
// don't run Z controller again in this loop
suppress_z_controller = true;
}
Expand Down
3 changes: 3 additions & 0 deletions ArduPlane/quadplane.h
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ class QuadPlane
// ignored unless OPTION_DELAY_ARMING or OPTION_TILT_DISARMED is set
bool delay_arming;

// minimum throttle for airbraking
AP_Int8 airbrake_thr_pct;

/*
return true if current mission item is a vtol takeoff
*/
Expand Down

0 comments on commit 00e200f

Please sign in to comment.