scsl 1.0.1
Shimmering Clarity Standard Library
|
Madgwick implements an efficient Orientation estimation for Intertial Measurement Units (IMUs). More...
#include <Madgwick.h>
Public Member Functions | |
Madgwick () | |
The Madgwick estimation is initialised with an identity MakeQuaternion. | |
Madgwick (scmp::geom::Vector< T, 3 > sf) | |
The Madgwick estimation is initialised with a sensor frame. | |
Madgwick (scmp::geom::Quaternion< T > sf) | |
Initialise the estimation with a sensor frame MakeQuaternion. | |
scmp::geom::Quaternion< T > | Orientation () const |
Return the current orientation as measured by the estimation. | |
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. | |
void | UpdateFrame (const scmp::geom::Quaternion< T > &sf, T delta) |
Update the sensor frame to a new frame. | |
void | UpdateFrame (const scmp::geom::Quaternion< T > &sf) |
Update the sensor frame to a new frame. | |
void | UpdateAngularOrientation (const scmp::geom::Vector< T, 3 > &gyro, T delta) |
Update the sensor frame with a gyroscope reading. | |
void | UpdateAngularOrientation (const scmp::geom::Vector< T, 3 > &gyro) |
Update the sensor frame with a gyroscope reading. | |
scmp::geom::Vector< T, 3 > | Euler () |
Retrieve a vector of the Euler angles in ZYX Orientation. | |
void | DeltaT (T newDeltaT) |
Set the default Δt. | |
T | DeltaT () |
Retrieve the estimation's current ΔT. | |
Madgwick implements an efficient Orientation estimation for Intertial Measurement Units (IMUs).
Madgwick is a novel Orientation estimation 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 estimation for inertial and inertial/magnetic sensor arrays.
T | A floating point type. |
|
inline |
The Madgwick estimation is initialised with an identity MakeQuaternion.
|
inline |
The Madgwick estimation 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 estimation with a sensor frame MakeQuaternion.
sf | A MakeQuaternion representing the current Orientation. |
|
inline |
Return the estimation'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 estimation'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 estimation.
|
inline |
Update the sensor frame with a gyroscope reading.
If no Δt is provided, the estimation'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. |