#sensor-fusion #accelerometer #gyroscope #robotics #duration #algorithm #note #vector3 #vqf-parameters

vqf

Implementation of the Versatile Quaternion-based Filter (VQF) algorithm for sensor fusion

8 unstable releases (3 breaking)

0.4.1 Nov 30, 2024
0.4.0 Nov 12, 2024
0.3.0 Nov 6, 2024
0.2.3 Nov 5, 2024
0.1.0 Nov 3, 2024

#438 in Hardware support

Download history 4/week @ 2024-12-10 2/week @ 2024-12-17 5/week @ 2024-12-24 14/week @ 2025-01-07 2/week @ 2025-01-14 2/week @ 2025-01-28 18/week @ 2025-02-04 36/week @ 2025-02-11 62/week @ 2025-02-18 24/week @ 2025-02-25 50/week @ 2025-03-04 161/week @ 2025-03-11 14/week @ 2025-03-18 24/week @ 2025-03-25

260 downloads per month

MIT/Apache

40KB
453 lines

vqf 🧭

License Crates.io Downloads Docs

demo

A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm, as described in this paper.

Note

Currently this crate does not implement the magnometer update.

Example

use nalgebra::Vector3;
use std::time::Duration;
use vqf::{Vqf, VqfParameters};

let gyro_rate = Duration::from_secs_f32(0.01); // 100Hz
let accel_rate = Duration::from_secs_f32(0.01);

let params = VqfParameters::default();
let mut vqf = Vqf::new(gyro_rate, accel_rate, params);

let gyro_data = Vector3::new(0.01, 0.02, -0.01); // rad/s
let accel_data = Vector3::new(0.0, 0.0, 9.81); // m/s^2

vqf.update(gyro_data, accel_data);

let orientation = vqf.orientation();
println!("Current orientation: {:?}", orientation);

Dependencies

~3MB
~67K SLoC