ardupilot
ardupilot copied to clipboard
Heli autorotation restructure mode and improve speed controller
This PR is the next step in bringing on the autorotation flight mode. It builds on the work done in #27786 and is dependant upon it. Hence, the diff looks very large at the moment.
The following changes have been made:
- A much needed re-structure to move more of the code out of the mode and down into the autorotation library
- Add pre-arm checks specific to the autorotation mode
- Improvement of the speed controller by moving to a full PID instead of just P and FF. Also, the accel limiting that I had previously implemented was a bit weird, so I have improved that.
- Move from a stabilise style control where pilot has to do both yaw and roll control, to a lateral acceleration controller, whereby pilot requests a lateral accel component and the controller figures out the roll angle and yaw rate needed to do a co-ordinated turn.
Testing has been in Real flight only.
The majority of this PR is still behind the SITL only wall.
Special attention should be paid to the changes in AP_MotorsHeli_Single, _Dual & _Quad whereby I have slightly modified the way we detect the collective is on land col min. A modification to the autorotation auto test highlighted that this flag was not tripping when collective was being constrained to land col min. This bit is not SITL only