fw-autotune: use 0.75*rate_limit as the target rate.

This commit is contained in:
mahima-yoga
2025-10-24 17:38:54 +02:00
committed by Mahima Yoga
parent 17e96554ec
commit 7323075527
2 changed files with 3 additions and 13 deletions
@@ -345,7 +345,7 @@ void FwAutotuneAttitudeControl::updateStateMachine(hrt_abstime now)
}
const float abs_roll_rate = fabsf(_angular_velocity(0));
const float target = min(kTargetRollRate, math::radians(_param_fw_r_rmax.get()));
const float target = 0.75f * math::radians(_param_fw_r_rmax.get());
updateAmplitudeDetectionState(now, abs_roll_rate, target);
@@ -396,7 +396,7 @@ void FwAutotuneAttitudeControl::updateStateMachine(hrt_abstime now)
const float abs_pitch_rate = fabsf(_angular_velocity(1));
const float max_pitch_rate = min(_param_fw_p_rmax_pos.get(), _param_fw_p_rmax_neg.get());
const float target = min(kTargetPitchRate, math::radians(max_pitch_rate));
const float target = 0.75f * math::radians(max_pitch_rate);
updateAmplitudeDetectionState(now, abs_pitch_rate, target);
@@ -444,7 +444,7 @@ void FwAutotuneAttitudeControl::updateStateMachine(hrt_abstime now)
}
const float abs_yaw_rate = fabsf(_angular_velocity(2));
const float target = min(kTargetYawRate, math::radians(_param_fw_y_rmax.get()));
const float target = 0.75f * math::radians(_param_fw_y_rmax.get());
updateAmplitudeDetectionState(now, abs_yaw_rate, target);
@@ -172,16 +172,6 @@ private:
static constexpr float kSignalAmpMax{5.0f};
static constexpr float kSignalAmpStep{0.1f};
// Target maximum angular rates for the system identification signal.
// ~45 deg/s for roll, ~30 deg/s for pitch and yaw. These values are:
// - High enough to provide good signal-to-noise ratio for identification.
// - Low enough to keep pitch and yaw responses within the linear range
// for most vehicles.
static constexpr float kTargetRollRate{0.8f};
static constexpr float kTargetPitchRate{0.5f};
static constexpr float kTargetYawRate{0.5f};
matrix::Vector3f _angular_velocity{};
bool _armed{false};