27#ifndef SCMP_FILTER_MADGWICK_H
28#define SCMP_FILTER_MADGWICK_H
57 Madgwick() : deltaT(0.0), previousSensorFrame(), sensorFrame()
75 deltaT(0.0), previousSensorFrame(), sensorFrame(sf)
85 return this->sensorFrame;
111 this->previousSensorFrame = this->sensorFrame;
112 this->sensorFrame = sf;
113 this->deltaT = delta;
144 if (scmp::WithinTolerance<T>(delta, 0.0, 0.00001)) {
174 return this->sensorFrame.Euler();
187 this->deltaT = newDeltaT;
Quaternion implementation suitable for navigation in R3.
Linear algebraic vector class.
Madgwick implements an efficient Orientation estimation for Intertial Measurement Units (IMUs).
Definition Madgwick.h:54
scmp::geom::Vector< T, 3 > Euler()
Retrieve a vector of the Euler angles in ZYX Orientation.
Definition Madgwick.h:172
scmp::geom::Quaternion< T > AngularRate(const scmp::geom::Vector< T, 3 > &gyro) const
Return the estimation's rate of angular change from a sensor frame.
Definition Madgwick.h:99
void UpdateAngularOrientation(const scmp::geom::Vector< T, 3 > &gyro)
Update the sensor frame with a gyroscope reading.
Definition Madgwick.h:162
Madgwick(scmp::geom::Quaternion< T > sf)
Initialise the estimation with a sensor frame MakeQuaternion.
Definition Madgwick.h:74
T DeltaT()
Retrieve the estimation's current ΔT.
Definition Madgwick.h:194
Madgwick()
The Madgwick estimation is initialised with an identity MakeQuaternion.
Definition Madgwick.h:57
void UpdateFrame(const scmp::geom::Quaternion< T > &sf)
Update the sensor frame to a new frame.
Definition Madgwick.h:123
void DeltaT(T newDeltaT)
Set the default Δt.
Definition Madgwick.h:185
void UpdateFrame(const scmp::geom::Quaternion< T > &sf, T delta)
Update the sensor frame to a new frame.
Definition Madgwick.h:109
void UpdateAngularOrientation(const scmp::geom::Vector< T, 3 > &gyro, T delta)
Update the sensor frame with a gyroscope reading.
Definition Madgwick.h:140
scmp::geom::Quaternion< T > Orientation() const
Return the current orientation as measured by the estimation.
Definition Madgwick.h:83
Madgwick(scmp::geom::Vector< T, 3 > sf)
The Madgwick estimation is initialised with a sensor frame.
Definition Madgwick.h:64
Quaternions provide a representation of Orientation and rotations in three dimensions.
Definition Quaternion.h:61
Vectors represent a direction and Magnitude.
Definition Vector.h:57
bool IsZero() const
Determine whether this is a zero vector.
Definition Vector.h:158
Quaternionf MakeQuaternion(Vector3F axis, float angle)
Convenience Quaternion construction function.
Shimmering Clarity Math & Physics toolkit.
Definition estimation.h:31