Struct ahrs::Madgwick [] [src]

pub struct Madgwick<N: Real> {
    pub quat: Quaternion<N>,
    // some fields omitted
}

Madgwick AHRS implementation.

Fields

Filter state quaternion.

Methods

impl<N: Real> Madgwick<N>
[src]

Creates a new Madgwick AHRS instance with identity quaternion.

Arguments

  • sample_period - The expected sensor sampling period in seconds.
  • beta - Filter gain.

Example

extern crate ahrs;

use ahrs::Madgwick;

fn main() {

    let ahrs = Madgwick::new(0.002390625f64, 0.1);
}

Creates a new Madgwick AHRS instance with given quaternion.

Arguments

  • sample_period - The expected sensor sampling period in seconds.
  • beta - Filter gain.
  • quat - Existing filter state quaternion.

Example

extern crate nalgebra as na;
extern crate ahrs;

use na::Quaternion;
use ahrs::Madgwick;

fn main() {

    let ahrs = Madgwick::new_with_quat( 0.002390625f64,
                                        0.1,
                                        Quaternion::new(1.0, 0.0, 0.0, 0.0));
}

Trait Implementations

impl<N: Eq + Real> Eq for Madgwick<N>
[src]

impl<N: PartialEq + Real> PartialEq for Madgwick<N>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<N: Clone + Real> Clone for Madgwick<N>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Debug + Real> Debug for Madgwick<N>
[src]

Formats the value using the given formatter.

impl<N: Hash + Real> Hash for Madgwick<N>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<N: Copy + Real> Copy for Madgwick<N>
[src]

impl Default for Madgwick<f64>
[src]

Creates a new Madgwick instance with default filter parameters:

Madgwick {
    sample_period: 1.0f64/256.0,
    beta: 0.1f64,
    quat: Quaternion { w: 1.0f64, i: 0.0, j: 0.0, k: 0.0 }
}

impl<N: Real> Ahrs<N> for Madgwick<N>
[src]

Attempts to update the current state quaternion using 9dof IMU values, made up by gyroscope, accelerometer, and magnetometer. Read more

Attempts to update the current state quaternion using 6dof IMU values, made up by gyroscope & accelerometer. Read more