https://github.com/oxkitsune/vqf
A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm
https://github.com/oxkitsune/vqf
accelerometer gyroscope imu quaternion robotics sensor-fusion signal-processing
Last synced: about 14 hours ago
JSON representation
A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm
- Host: GitHub
- URL: https://github.com/oxkitsune/vqf
- Owner: oxkitsune
- License: apache-2.0
- Created: 2024-11-03T18:13:42.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-30T12:22:06.000Z (11 months ago)
- Last Synced: 2025-08-20T23:17:20.214Z (about 2 months ago)
- Topics: accelerometer, gyroscope, imu, quaternion, robotics, sensor-fusion, signal-processing
- Language: Rust
- Homepage:
- Size: 47.9 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# vqf ðŸ§
[](https://github.com/oxkitsune/vqf#license)
[](https://crates.io/crates/vqf)
[](https://crates.io/crates/vqf)
[](https://docs.rs/vqf/latest/vqf/)
A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm, as described in [this paper](https://arxiv.org/pdf/2203.17024).
> [!NOTE]
> Currently this crate does *not* implement the magnometer update.## Example
```rust
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^2vqf.update(gyro_data, accel_data);
let orientation = vqf.orientation();
println!("Current orientation: {:?}", orientation);
```