Skip to content

Commit

Permalink
4.6:Autotune gains test switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Nov 13, 2024
1 parent e857479 commit 6723f5c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/source/docs/common-auxiliary-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ Supported Features
+----------------------+----------------------------+----------+---------+---------+
| 176 | VTOL Fwd Throttle disable | | X | |
+----------------------+----------------------------+----------+---------+---------+
| 180 | Autotune_test_gains | X | X | |
+----------------------+----------------------------+----------+---------+---------+

Intended as continuous PWM range control inputs:

Expand Down Expand Up @@ -569,6 +571,7 @@ Other functions are:
Camera Image Tracking Activate Camera Image Tracking (only supported by ViewPro camera gimbals)
Camera Lens Select the active camera lens (only supported by ViewPro camera gimbals)
VTOL Fwd Throttle disable Overrides use of forward throttle in VTOL modes
Autotune_test_gains After autotune,allows selecting tune(high) or pretune gains
ROLL Input ROLL input channel. (replaces RCMAP)
PITCH Input PITCH input channel. (replaces RCMAP)
THROTTLE Input THROTTLE input channel. (replaces RCMAP)
Expand Down
5 changes: 5 additions & 0 deletions copter/source/docs/autotune.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ AutoTune performs a weak position hold if invoked from Loiter or PosHold flight
- To twitch perpendicular to the wind direction, the vehicle may suddenly rotate in either direction up to 90 degrees as it drifts 5m (or more) from the target location.
- If there is little or no wind, the vehicle's gentle position control may mean it moves back and forth, ping-ponging around the target point changing yaw each time it strays more than 5m from the target. In these cases, it may be more comfortable to revert to the simpler AltHold-based AutoTune.

Testing Tune in Other Modes
===========================

The completed suceesfull tune obtained can be tested in any mode, not just the one (ALTHOLD or LOITER) used for entry. A switch can be setup,``RCx_OPTION`` = 180 (AUTOTUNE_TEST_GAINS) that will allow switching between original and autotuned gains in any mode, after autotune has completed. If this switch is setup, but not changed after the auotune has completed, it has no effect. Otherwise if switched high the tuned gains are in effect, if low the original gains. Then they apply to any flight mode and will be made permanent upon the next disarm, based on switch position.

If AutoTune fails
=================

Expand Down
5 changes: 5 additions & 0 deletions plane/source/docs/automatic-tuning-with-autotune.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ Very light, agile aircraft may fail to complete the tune, or result in a tune th

.. note:: increasing the gyro filter cutof may allow more system noise into the control loops and setting up a :ref:`dynamic throttle notch filter<common-throttle-based-notch>` or :ref:`in-flight FFT<common-imu-fft>` is recommended (if your autopilot firmware includes this feature.. see: :ref:`Firmware Limitations<common-limited_firmware>` ).

Testing Tune in Other Modes
===========================

The completed suceesfull tune obtained can be tested in any mode, not just the one (QHOVER or QLOITER) used for entry. A switch can be setup,``RCx_OPTION`` = 180 (AUTOTUNE_TEST_GAINS) that will allow switching between original and autotuned gains in any mode, after autotune has completed. If this switch is setup, but not changed after the auotune has completed, it has no effect. Otherwise if switched high the tuned gains are in effect, if low the original gains. Then they apply to any flight mode and will be made permanent upon the next disarm, based on switch position.

ACRO Mode YAW Rate Controller
=============================

Expand Down

0 comments on commit 6723f5c

Please sign in to comment.