[−][src]Struct ahrs::Madgwick
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]
fn update(
&mut self,
gyroscope: &Vector3<N>,
accelerometer: &Vector3<N>,
magnetometer: &Vector3<N>
) -> Result<&Quaternion<N>, &str>
[src]
&mut self,
gyroscope: &Vector3<N>,
accelerometer: &Vector3<N>,
magnetometer: &Vector3<N>
) -> Result<&Quaternion<N>, &str>
fn update_imu(
&mut self,
gyroscope: &Vector3<N>,
accelerometer: &Vector3<N>
) -> Result<&Quaternion<N>, &str>
[src]
&mut self,
gyroscope: &Vector3<N>,
accelerometer: &Vector3<N>
) -> Result<&Quaternion<N>, &str>
impl<N: Scalar + SimdValue> Clone for Madgwick<N>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
N::Element: SimdRealField,
impl<N: SimdRealField + Hash> Hash for Madgwick<N>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<N: SimdRealField> PartialEq<Madgwick<N>> for Madgwick<N> where
N::Element: SimdRealField,
[src]
N::Element: SimdRealField,
Auto Trait Implementations
impl<N> RefUnwindSafe for Madgwick<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Madgwick<N> where
N: Send,
N: Send,
impl<N> Sync for Madgwick<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Madgwick<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Madgwick<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,