mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 10:20:34 +08:00
AlphaFilter: set time constant instead of alpha
Then the update function can set the dt at every iteration if needed
This commit is contained in:
@@ -52,7 +52,8 @@ class AlphaFilter
|
||||
{
|
||||
public:
|
||||
AlphaFilter() = default;
|
||||
explicit AlphaFilter(float alpha) : _alpha(alpha) {}
|
||||
explicit AlphaFilter(float sample_interval, float time_constant) { setParameters(sample_interval, time_constant); }
|
||||
explicit AlphaFilter(float time_constant) : _time_constant(time_constant) {};
|
||||
|
||||
~AlphaFilter() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user