You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add gain getters to MahonyFilter and MadgwickFilter #379
What: the gains of the two attitude filters are set with with_* builders, but a caller cannot read them back. Add these methods, each with #[inline] and #[must_use]:
MahonyFilter::proportional_gain(&self) -> T and MahonyFilter::integral_gain(&self) -> T
MadgwickFilter::correction_gain(&self) -> T and MadgwickFilter::bias_gain(&self) -> T
Copy the existing orientation and gyroscope_bias getters in the same files.
Where: crates/multicalc/src/estimation/mahony_filter.rs and crates/multicalc/src/estimation/madgwick_filter.rs. Tests go in crates/multicalc/tests/suite/estimation/attitude_filter.rs.
How to test: cargo test -p multicalc. Assert the defaults of new(SO3::identity()): Mahony 1.0 and 0.1, Madgwick 0.1 and 0.01. Assert that each with_* builder round-trips, for example MahonyFilter::new(SO3::identity()).with_proportional_gain(2.5).proportional_gain() == 2.5. Do the same in f32.
Activity