Struct madgwick::Marg
[−]
[src]
pub struct Marg { /* fields omitted */ }
MARG orientation filter
Methods
impl Marg
[src]
pub fn new(beta: f32, sample_period: f32) -> Self
[src]
Creates a new MARG filter
beta
, filter gain. See section 3.6 of the report for details.sample_period
, period at which the sensors are being sampled (unit: s)
pub fn update(&mut self, m: F32x3, ar: F32x3, g: F32x3) -> Quaternion
[src]
Updates the MARG filter and returns the current estimate of the 3D orientation
m
, magnetic north / magnetometer readingsar
, angular rate / gyroscope readings (unit: rad / s)g
, gravity vector / accelerometer readings