scsl
0.2.5
Shimmering Clarity Standard Library
|
Madgwick implements an efficient Orientation filter for IMUs. More...
#include <Madgwick.h>
Public Member Functions | |
Madgwick () | |
The Madgwick filter is initialised with an identity MakeQuaternion. More... | |
Madgwick (scmp::geom::Vector< T, 3 > sf) | |
The Madgwick filter is initialised with a sensor frame. More... | |
Madgwick (scmp::geom::Quaternion< T > sf) | |
Initialise the filter with a sensor frame MakeQuaternion. More... | |
scmp::geom::Quaternion< T > | Orientation () const |
Return the current orientation as measured by the filter. More... | |
scmp::geom::Quaternion< T > | AngularRate (const scmp::geom::Vector< T, 3 > &gyro) const |
Return the filter's rate of angular change from a sensor frame. More... | |
void | UpdateFrame (const scmp::geom::Quaternion< T > &sf, T delta) |
Update the sensor frame to a new frame. More... | |
void | UpdateFrame (const scmp::geom::Quaternion< T > &sf) |
Update the sensor frame to a new frame. More... | |
void | UpdateAngularOrientation (const scmp::geom::Vector< T, 3 > &gyro, T delta) |
Update the sensor frame with a gyroscope reading. More... | |
void | UpdateAngularOrientation (const scmp::geom::Vector< T, 3 > &gyro) |
Update the sensor frame with a gyroscope reading. More... | |
scmp::geom::Vector< T, 3 > | Euler () |
Retrieve a vector of the Euler angles in ZYX Orientation. More... | |
void | DeltaT (T newDeltaT) |
Set the default Δt. More... | |
T | DeltaT () |
Retrieve the filter's current ΔT. More... | |
Madgwick implements an efficient Orientation filter for IMUs.
Madgwick is a novel Orientation filter applicable to IMUs consisting of tri-Axis gyroscopes and accelerometers, and MARG sensor arrays that also include tri-Axis magnetometers. The MARG implementation incorporates magnetic distortionand gyroscope bias drift compensation.
It is described in the paper An efficient Orientation filter for inertial and inertial/magnetic sensor arrays.
T | A floating point type. |
|
inline |
The Madgwick filter is initialised with an identity MakeQuaternion.
|
inline |
The Madgwick filter is initialised with a sensor frame.
sf | A sensor frame; if zero, the sensor frame will be initialised as an identity MakeQuaternion. |
|
inline |
Initialise the filter with a sensor frame MakeQuaternion.
sf | A MakeQuaternion representing the current Orientation. |
|
inline |
Return the filter's rate of angular change from a sensor frame.
Return the rate of change of the Orientation of the earth frame with respect to the sensor frame.
gyro | A three-dimensional vector containing gyro readings as w_x, w_y, w_z. |
|
inline |
Retrieve the filter's current ΔT.
|
inline |
Set the default Δt.
newDeltaT | The time delta to use when no time delta is provided. |
|
inline |
Retrieve a vector of the Euler angles in ZYX Orientation.
|
inline |
Return the current orientation as measured by the filter.
|
inline |
Update the sensor frame with a gyroscope reading.
If no Δt is provided, the filter's default is used.
gyro | A three-dimensional vector containing gyro readings as w_x, w_y, w_z. |
|
inline |
Update the sensor frame with a gyroscope reading.
This method will assert that the Δt value is not zero within a 100μs tolerance. This assert is compiled out with the compile flag NDEBUG, but may be useful to catch possible errors.
gyro | A three-dimensional vector containing gyro readings as w_x, w_y, w_z. |
delta | The time step between readings. It must not be zero. |
|
inline |
Update the sensor frame to a new frame.
sf | The new sensor frame replacing the previous one. |
|
inline |
Update the sensor frame to a new frame.
sf | The new sensor frame replacing the previous one. |
delta | The time delta since the last update. |