Crate vqf

Crate vqf 

Source
Expand description

§Versatile Quaternion Filter (VQF) for Orientation Estimation.

This crate implements the VQF based on this paper.

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

Modules§

low_pass_filter
A module implementing second-order Butterworth low-pass filters for multi-dimensional signals.

Structs§

Vqf
Filter for orientation estimation using accelerometer and gyroscope measurements.
VqfBiasCoefficients
Coefficients for gyroscope bias estimation.
VqfCoefficients
Coefficients used for in a Vqf system.
VqfParameters
Parameters for configuring a Vqf.
VqfState
The state of a Vqf filter.