Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ vqf Public
forked from oxkitsune/vqf

A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm

License

Notifications You must be signed in to change notification settings

pperanich/vqf

 
 

Repository files navigation

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);

About

A Rust implementation of the Versatile Quaternion-based Filter (VQF) algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%