fw-autotune: detect and limit amplitude of ID maneuver

Increases signal ampltiude on a 1Hz sin input until a target rate (R/P/Y = 0.8/0.5/0.5 rad/s) is reached. Identification signal is then scaled with this ampltitude instead of the user-defined parameter.
This commit is contained in:
mahima-yoga
2025-10-02 15:17:40 +02:00
committed by Mahima Yoga
parent 97a97991c1
commit 614e15d5f4
5 changed files with 248 additions and 67 deletions
@@ -318,6 +318,9 @@ void FixedwingAttitudeControl::Run()
if ((pid_autotune.state == autotune_attitude_control_status_s::STATE_ROLL
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_PITCH
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_YAW
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_ROLL_AMPLITUDE_DETECTION
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_PITCH_AMPLITUDE_DETECTION
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_YAW_AMPLITUDE_DETECTION
|| pid_autotune.state == autotune_attitude_control_status_s::STATE_TEST)
&& ((hrt_absolute_time() - pid_autotune.timestamp) < 1_s)) {