Browse Source

Plane: added engine cut on land final in quadplane

mission-4.1.18
Andrew Tridgell 9 years ago
parent
commit
f65b46385c
  1. 12
      ArduPlane/quadplane.cpp
  2. 3
      ArduPlane/quadplane.h

12
ArduPlane/quadplane.cpp

@ -314,6 +314,13 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = { @@ -314,6 +314,13 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = {
// @User: Standard
AP_GROUPINFO("VFWD_ALT", 43, QuadPlane, vel_forward_alt_cutoff, 0),
// @Param: LAND_ICE_CUT
// @DisplayName: Cut IC engine on landing
// @Description: This controls stopping an internal combustion engine in the final landing stage of a VTOL. This is important for aircraft where the forward thrust engine may experience prop-strike if left running during landing. This requires the engine controls are enabled using the ICE_* parameters.
// @Values: 0:Disabled,1:Enabled
// @User: Standard
AP_GROUPINFO("LAND_ICE_CUT", 44, QuadPlane, land_icengine_cut, 1),
AP_GROUPEND
};
@ -1669,6 +1676,11 @@ bool QuadPlane::verify_vtol_land(void) @@ -1669,6 +1676,11 @@ bool QuadPlane::verify_vtol_land(void)
if (poscontrol.state == QPOS_LAND_DESCEND && height_above_ground < land_final_alt) {
poscontrol.state = QPOS_LAND_FINAL;
pos_control->set_alt_target(inertial_nav.get_altitude());
// cut IC engine if enabled
if (land_icengine_cut != 0) {
plane.g2.ice_control.engine_control(0, 0, 0);
}
plane.gcs_send_text(MAV_SEVERITY_INFO,"Land final started");
}

3
ArduPlane/quadplane.h

@ -225,6 +225,9 @@ private: @@ -225,6 +225,9 @@ private:
AP_Int8 esc_calibration;
void run_esc_calibration(void);
// ICEngine control on landing
AP_Int8 land_icengine_cut;
struct {
AP_Float gain;
float integrator;

Loading…
Cancel
Save