[Multirotor] add yaw torque low pass filter (#24173)

co-authored-by: danielmellinger <107884356+danielmellinger@users.noreply.github.com>
co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
This commit is contained in:
Mathieu Bresciani
2025-01-15 14:02:28 +01:00
committed by GitHub
co-authored by danielmellinger Eric Katzfey
parent 974446c0e8
commit 8ecb76aba2
4 changed files with 34 additions and 1 deletions
@@ -89,6 +89,16 @@ public:
return true;
}
void setCutoffFreq(float cutoff_freq)
{
if (cutoff_freq > FLT_EPSILON) {
_time_constant = 1.f / (M_TWOPI_F * cutoff_freq);
} else {
_time_constant = 0.f;
}
}
/**
* Set filter parameter alpha directly without time abstraction
*