1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Safe idiomatic Rust API for the PX4 EKF2 navigation filter.
//!
//! # Quick start
//!
//! ```no_run
//! use ekf2::{Ekf, types::ImuSample};
//!
//! let mut ekf = Ekf::new().expect("EKF allocation failed");
//!
//! // Feed IMU data at 100 Hz
//! for i in 0..1000_u64 {
//! let ts_us = i * 10_000; // 10 ms → 100 Hz
//! let sample = ImuSample::new(
//! ts_us,
//! [0.0, 0.0, 0.01], // tiny yaw rate
//! [0.0, 0.0, -9.81*0.01], // gravity
//! 0.01,
//! 0.01,
//! );
//! ekf.set_imu_data(&sample);
//! let _ = ekf.update();
//! }
//!
//! if ekf.attitude_valid() {
//! let q = ekf.quaternion();
//! println!("q = [{:.4}, {:.4}, {:.4}, {:.4}]", q[0], q[1], q[2], q[3]);
//! }
//! ```
//!
//! # Feature flags
//!
//! Each sensor type is guarded by a Cargo feature (defaults: `gnss`,
//! `magnetometer`, `barometer`). See
//! [`ekf2-sys`](https://docs.rs/ekf2-sys) for the full table.
//!
//! # Memory model
//!
//! [`Ekf::new`] creates the heap-owned C++ object using Rust's global
//! allocator. [`Ekf::new_in`] and [`Ekf::with_config_in`] accept any `allocator-api2`
//! allocator. The selected allocator is passed to C++ as per-instance callbacks
//! and is used for the object and all of its owned dynamic storage.
//!
//! # no_std
//!
//! This crate does not depend on `std`. [`Ekf::new`] uses the target's global
//! allocator, while [`Ekf::new_in`] accepts a custom allocator.
pub use ;
pub use EkfError;
pub use ;
pub use EkfBiasEstimatorStatus as BiasEstimatorStatus;
pub use ;
pub use ;
pub use ;