[][src]Struct ahrs::Madgwick

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

Madgwick AHRS implementation.

Example

let mut ahrs = Madgwick::new(0.002390625f64, 0.1);
println!("madgwick filter: {:?}", ahrs);

// Can now process IMU data using `Ahrs::update_imu`, etc.

Fields

quat: Quaternion<N>

Filter state quaternion.

Implementations

impl<N: Scalar + SimdValue + One + Zero> Madgwick<N>[src]

pub fn new(sample_period: N, beta: N) -> Self[src]

Creates a new Madgwick AHRS instance with identity quaternion.

Arguments

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

pub fn new_with_quat(sample_period: N, beta: N, quat: Quaternion<N>) -> Self[src]

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.

Trait Implementations

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

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

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

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

impl Default for Madgwick<f64>[src]

fn default() -> Madgwick<f64>[src]

Creates a new Madgwick instance with default filter parameters.

dbg!(Madgwick::default());

// prints (roughly):
//
// 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: SimdRealField + Eq> Eq for Madgwick<N> where
    N::Element: SimdRealField
[src]

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

impl<N: SimdRealField> PartialEq<Madgwick<N>> for Madgwick<N> where
    N::Element: SimdRealField
[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Madgwick<N> where
    N: RefUnwindSafe

impl<N> Send for Madgwick<N> where
    N: Send

impl<N> Sync for Madgwick<N> where
    N: Sync

impl<N> Unpin for Madgwick<N> where
    N: Unpin

impl<N> UnwindSafe for Madgwick<N> where
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,