sunsided / minikalman-rs

Fixed- and floating-point Kalman filters for resource-constrained environments, written in Rust.
https://crates.io/crates/minikalman
MIT License
4 stars 1 forks source link

Add Kalman Filter, Input and Measurement builders #12

Closed sunsided closed 1 month ago

sunsided commented 1 month ago

This adds builders to quickly conjure a filter when the alloc crate feature is enabled. This turns the lengthy buffer wiring into a simple

let builder = KalmanFilterBuilder::<NUM_STATES, f32>::default();
let mut filter = builder.build();
let mut input = builder.inputs().build::<NUM_INPUTS>();
let mut measurement = builder.measurements().build::<NUM_MEASUREMENTS>();

These returned types still require the temporary buffers. While this works for this specific crate, it would be nice if we could just keep it to the strictly necessary definitions (i.e., no temp buffers in the type signature).

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 97.61621% with 20 lines in your changes missing coverage. Please review.

Project coverage is 81.80%. Comparing base (af24668) to head (5a366d1).

Files Patch % Lines
crates/minikalman/src/test_dummies.rs 0.00% 20 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #12 +/- ## =========================================== + Coverage 44.77% 81.80% +37.03% =========================================== Files 28 30 +2 Lines 2890 3897 +1007 =========================================== + Hits 1294 3188 +1894 + Misses 1596 709 -887 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.