Commit Graph

209 Commits

Author SHA1 Message Date
Thomas Watson b43cabd443 AC_AutoTune: fix tracking of maximum angular acceleration
Issue introduced in https://github.com/ArduPilot/ardupilot/pull/27370
and partially fixed in https://github.com/ArduPilot/ardupilot/pull/27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
2024-12-12 15:13:40 +11:00
Leonard Hall 2cddea8d9f AC_Autotune_Multi: Use rate step command 2024-09-26 19:25:33 +10:00
Andy Piper c7b0dfc915 AC_AutoTune: Write_Rate() moved to AC_AttitudeControl 2024-09-10 16:33:04 +01:00
Iampete1 f6da3ce764 AC_AutoTune: add support for testing tune via aux function 2024-08-13 08:57:44 +09:00
Iampete1 94d3e2673a AC_AutoTune: Multi and Heli: only load tuned gains if a axis has completed successfully 2024-08-13 08:57:44 +09:00
Peter Barker ce03fd3ed9 AC_AutoTune: remove unused variable from heli autotune 2024-08-12 13:30:26 -04:00
Peter Barker bf09835509 AC_AutoTune: use GCS_SEND_TEXT rather than gcs().send_text
Co-authored-by: muramura <ma2maru@gmail.com>
2024-08-07 18:33:16 +10:00
Leonard Hall a4a9113cde AC_Autotune: Fix bug introduced in #27370 2024-08-06 17:45:04 +10:00
Peter Barker 7f4074a22c AC_AutoTune: rename pid setters to include set_ in the names 2024-07-31 18:43:42 +10:00
Peter Barker 9397ece55a AC_AutoTune: make axis-type enum-class
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-07-30 10:20:26 +10:00
Leonard Hall bb1758ecb1 AC_Autotune: Add ABORT state for consistency between tests 2024-07-26 20:11:42 +10:00
Leonard Hall bea2c5b59b AC_Autotune: Clean up Multi Variables and non functional changes 2024-07-26 20:11:42 +10:00
Peter Barker 3dff46b2b2 AC_AutoTune: remove unused variables 2024-07-04 13:19:12 +10:00
Peter Barker 35bdadb8ec AC_AutoTune: adjust variable names to include _cd postfix 2024-07-04 13:19:12 +10:00
bnsgeyer 5fa2fcfa56 AC_AutoTune: return freqresp ring buffers to original implementation 2024-07-01 22:57:55 -04:00
bnsgeyer 475663e199 AC_AutoTune: use ring buffer only for dwells 2024-07-01 22:57:55 -04:00
bnsgeyer bb6c52d508 AC_AutoTune: remove deletion of ring buffers 2024-07-01 22:57:55 -04:00
bnsgeyer f50bb54112 AC_AutoTune: more suggested changes 2024-07-01 22:57:55 -04:00
bnsgeyer 088b7ec094 AC_AutoTune: incorporate suggested changes 2024-07-01 22:57:55 -04:00
Bill Geyer 41ed4d1321 AC_AutoTune: use new new macro
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2024-07-01 22:57:55 -04:00
bnsgeyer b13efc86af AC_AutoTune: use attitude controller to enforce rate and accel limits 2024-07-01 22:57:55 -04:00
bnsgeyer ad1b01cd56 AC_AutoTune: improve RFF dwell test and data processing 2024-07-01 22:57:55 -04:00
Bill Geyer 30c2e1f53b AC_AutoTune: general cleanup and protect against freq exceedences 2024-07-01 22:57:55 -04:00
bnsgeyer cc7e43d643 AC_AutoTune: max gain, rate p and d tuning use common search method 2024-07-01 22:57:55 -04:00
bnsgeyer cf50aa1321 AC_AutoTune: trad heli variable cleanup 2024-07-01 22:57:55 -04:00
bnsgeyer ad58f3e1f8 AC_AutoTune: reworked updating max gains 2024-07-01 22:57:55 -04:00
bnsgeyer 989f48f97a AC_AutoTune: reworked updating angle p up 2024-07-01 22:57:55 -04:00
bnsgeyer cd18607f25 AC_AutoTune: reworked updating rate p and d up 2024-07-01 22:57:55 -04:00
bnsgeyer 61182c0e96 AC_AutoTune: reworked dwell_test and updating ff up 2024-07-01 22:57:55 -04:00
bnsgeyer 2339c7daed AC_AutoTune: moved more into dwell_test_init 2024-07-01 22:57:55 -04:00
bnsgeyer 7ff99a39f0 AC_AutoTune: fix tests to work better 2024-07-01 22:57:55 -04:00
bnsgeyer 3943a69b33 AC_AutoTune: fix object buffers to dynamically size 2024-07-01 22:57:55 -04:00
bnsgeyer 528b7eb438 AC_AutoTune: general cleanup to make code more efficient 2024-07-01 22:57:55 -04:00
bnsgeyer 9e4d118cc9 AC_AutoTune: remove sweep for Rate D up 2024-07-01 22:57:55 -04:00
bnsgeyer 32af6216b7 AC_Autotune: tradheli use dwell for FF test 2024-07-01 22:57:55 -04:00
bnsgeyer dd1f0cdcf7 AC_AutoTune: make rate freq sweeps safer 2024-07-01 22:57:55 -04:00
Peter Barker 0ee787325a AC_AutoTune: NFC whitespace, ordering and add trailing comma to enumeration 2024-06-27 10:12:30 +10:00
Leonard Hall 5ab2aaffff AC_Autotune: Clean up Multi Variables and non functional changes 2024-06-24 19:11:41 +10:00
Leonard Hall 0accc61107 AC_AutoTune: Move functions out of HAL_LOGGING_ENABLED 2024-05-29 18:29:23 +10:00
Leonard Hall 20edb9185d Copter: Autotune: Remove double call to AC_Attitude_Control 2024-05-29 18:29:23 +10:00
Leonard Hall b9e06402af Copter: Autotune: Increase waiting for level timeout. 2024-05-29 18:29:23 +10:00
Leonard Hall cebcbf0044 Copter: Autotune: Virtual methods to separate Heli and Multi 2024-05-29 18:29:23 +10:00
Leonard Hall 45525a40b8 Copter: Autotune: Don't Fail min D for Yaw Filter 2024-05-29 18:29:23 +10:00
Leonard Hall a7962c35b6 Copter: Autotune: Reduce MIN_D 2024-05-29 18:29:23 +10:00
Leonard Hall 858d90cb95 Copter: Autotune: Improve angle limit test 2024-05-29 18:29:23 +10:00
Leonard Hall 712cf3696b Copter: Autotune: Small changes for clarity 2024-05-29 18:29:23 +10:00
Leonard Hall 79f4e0a2d8 Copter: Autotune: Level requirement improvements 2024-05-29 18:29:23 +10:00
Leonard Hall 41a5a1b8fe Copter: Autotune: Notify user of min Rate D for action 2024-05-29 18:29:23 +10:00
Leonard Hall fcd3c8502f Copter: Autotune: Twitch direction enhancements 2024-05-29 18:29:23 +10:00
Leonard Hall e2560371cf Copter: Autotune: Base angles limits on lean_angle_max 2024-05-29 18:29:23 +10:00