From f9aac6919cee46f1063284b42a0a88e0329ee1dd Mon Sep 17 00:00:00 2001 From: Nathan E Date: Thu, 20 Dec 2018 17:39:38 -0600 Subject: [PATCH] Update AP_RollController.cpp --- libraries/APM_Control/AP_RollController.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/libraries/APM_Control/AP_RollController.cpp b/libraries/APM_Control/AP_RollController.cpp index 9861490522..894dd36af7 100644 --- a/libraries/APM_Control/AP_RollController.cpp +++ b/libraries/APM_Control/AP_RollController.cpp @@ -3,12 +3,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -25,7 +25,7 @@ extern const AP_HAL::HAL& hal; const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: TCONST // @DisplayName: Roll Time Constant - // @Description: This controls the time constant in seconds from demanded to achieved bank angle. A value of 0.5 is a good default and will work with nearly all models. Advanced users may want to reduce this time to obtain a faster response but there is no point setting a time less than the aircraft can achieve. + // @Description: Time constant in seconds from demanded to achieved roll angle. Most models respond well to 0.5. May be reduced for faster responses, but setting lower than a model can achieve will not help. // @Range: 0.4 1.0 // @Units: s // @Increment: 0.1 @@ -34,7 +34,7 @@ const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: P // @DisplayName: Proportional Gain - // @Description: This is the gain from bank angle error to aileron. + // @Description: Proportional gain from roll angle demands to ailerons. Higher values allow more servo response but can cause oscillations. Automatically set and adjusted by AUTOTUNE mode. // @Range: 0.1 4.0 // @Increment: 0.1 // @User: User @@ -42,15 +42,15 @@ const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: D // @DisplayName: Damping Gain - // @Description: This is the gain from roll rate to aileron. This adjusts the damping of the roll control loop. It has the same effect as RLL2SRV_D in the old PID controller but without the spikes in servo demands. This gain helps to reduce rolling in turbulence. It should be increased in 0.01 increments as too high a value can lead to a high frequency roll oscillation that could overstress the airframe. - // @Range: 0 0.1 + // @Description: Damping gain from roll acceleration to ailerons. Higher values reduce rolling in turbulence, but can cause oscillations. Automatically set and adjusted by AUTOTUNE mode. + // @Range: 0 0.2 // @Increment: 0.01 // @User: User AP_GROUPINFO("D", 2, AP_RollController, gains.D, 0.08f), // @Param: I // @DisplayName: Integrator Gain - // @Description: This is the gain from the integral of bank angle to aileron. It has the same effect as RLL2SRV_I in the old PID controller. Increasing this gain causes the controller to trim out steady offsets due to an out of trim aircraft. + // @Description: Integrator gain from long-term roll angle offsets to ailerons. Higher values "trim" out offsets faster but can cause oscillations. Automatically set and adjusted by AUTOTUNE mode. // @Range: 0 1.0 // @Increment: 0.05 // @User: User @@ -58,7 +58,7 @@ const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: RMAX // @DisplayName: Maximum Roll Rate - // @Description: This sets the maximum roll rate that the controller will demand (degrees/sec). Setting it to zero disables the limit. If this value is set too low, then the roll can't keep up with the navigation demands and the plane will start weaving. If it is set too high (or disabled by setting to zero) then ailerons will get large inputs at the start of turns. A limit of 60 degrees/sec is a good default. + // @Description: Maximum roll rate that the roll controller demands (degrees/sec) in ACRO mode. // @Range: 0 180 // @Units: deg/s // @Increment: 1 @@ -67,7 +67,7 @@ const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: IMAX // @DisplayName: Integrator limit - // @Description: This limits the number of degrees of aileron in centi-degrees over which the integrator will operate. At the default setting of 3000 centi-degrees, the integrator will be limited to +- 30 degrees of servo travel. The maximum servo deflection is +- 45 centi-degrees, so the default value represents a 2/3rd of the total control throw which is adequate unless the aircraft is severely out of trim. + // @Description: Limit of roll integrator gain in centi-degrees of servo travel. Servos are assumed to have +/- 4500 centi-degrees of travel, so a value of 3000 allows trim of up to 2/3 of servo travel range. // @Range: 0 4500 // @Increment: 1 // @User: Advanced @@ -75,7 +75,7 @@ const AP_Param::GroupInfo AP_RollController::var_info[] = { // @Param: FF // @DisplayName: Feed forward Gain - // @Description: This is the gain from demanded rate to aileron output. + // @Description: Gain from demanded rate to aileron output. // @Range: 0.1 4.0 // @Increment: 0.1 // @User: User @@ -216,4 +216,3 @@ void AP_RollController::reset_I() { _pid_info.I = 0; } -