From 02d37d43d253c6b56f104122ce20f5a8df26b911 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Mon, 17 Sep 2018 20:40:12 -0700 Subject: [PATCH] Plane: Disallow climbs during TRANSITION_AIRSPEED_WAIT --- ArduPlane/quadplane.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index cbf4a418db..ce2e1188ea 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -327,7 +327,7 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = { // @Param: OPTIONS // @DisplayName: quadplane options - // @Description: This provides a set of additional control options for quadplanes. LevelTransition means that the wings should be held level to within LEVEL_ROLL_LIMIT degrees during transition to fixed wing flight. If AllowFWTakeoff bit is not set then fixed wing takeoff on quadplanes will instead perform a VTOL takeoff. If AllowFWLand bit is not set then fixed wing land on quadplanes will instead perform a VTOL land. If respect takeoff frame is not set the vehicle will interpret all takeoff waypoints as an altitude above the corrent position. + // @Description: This provides a set of additional control options for quadplanes. LevelTransition means that the wings should be held level to within LEVEL_ROLL_LIMIT degrees during transition to fixed wing flight, and the vehicle will not use the vertical lift motors to climb during the transition. If AllowFWTakeoff bit is not set then fixed wing takeoff on quadplanes will instead perform a VTOL takeoff. If AllowFWLand bit is not set then fixed wing land on quadplanes will instead perform a VTOL land. If respect takeoff frame is not set the vehicle will interpret all takeoff waypoints as an altitude above the corrent position. // @Bitmask: 0:LevelTransition,1:AllowFWTakeoff,2:AllowFWLand,3:Respect takeoff frame types AP_GROUPINFO("OPTIONS", 58, QuadPlane, options, 0), @@ -1309,7 +1309,15 @@ void QuadPlane::update_transition(void) gcs().send_text(MAV_SEVERITY_INFO, "Transition airspeed reached %.1f", (double)aspeed); } assisted_flight = true; - hold_hover(assist_climb_rate_cms()); + + // do not allow a climb on the quad motors during transition + // a climb would add load to the airframe, and prolongs the + // transition + float climb_rate_cms = assist_climb_rate_cms(); + if (options & OPTION_LEVEL_TRANSITION) { + climb_rate_cms = MIN(climb_rate_cms, 0.0f); + } + hold_hover(climb_rate_cms); last_throttle = motors->get_throttle(); // reset integrators while we are below target airspeed as we