Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | List of all members
INDI::IMUSensorFusion Class Referenceabstract

Abstract base class for IMU sensor fusion algorithms. More...

#include <imusensorfusion.h>

Inheritance diagram for INDI::IMUSensorFusion:
INDI::MadgwickFilter INDI::MahonyFilter

Public Member Functions

virtual ~IMUSensorFusion ()=default
 
virtual void update (double gx, double gy, double gz, double ax, double ay, double az, double mx, double my, double mz, double dt, bool useMag=true)=0
 Perform one filter update step.
 
virtual void getQuaternion (double &w, double &i, double &j, double &k) const =0
 Return the current orientation quaternion.
 
virtual void reset ()=0
 Reset the filter to the identity quaternion.
 

Detailed Description

Abstract base class for IMU sensor fusion algorithms.

Accepts calibrated 9-DOF sensor data (accelerometer, gyroscope, magnetometer) and produces a quaternion representing the orientation of the sensor in the world frame. Gracefully degrades to 6-DOF if magnetometer data is not available.

All inputs use SI units:

Definition at line 43 of file imusensorfusion.h.

Constructor & Destructor Documentation

◆ ~IMUSensorFusion()

virtual INDI::IMUSensorFusion::~IMUSensorFusion ( )
virtualdefault

Member Function Documentation

◆ getQuaternion()

virtual void INDI::IMUSensorFusion::getQuaternion ( double &  w,
double &  i,
double &  j,
double &  k 
) const
pure virtual

Return the current orientation quaternion.

Parameters
wScalar (real) component
iVector X component
jVector Y component
kVector Z component

Implemented in INDI::MadgwickFilter, and INDI::MahonyFilter.

◆ reset()

virtual void INDI::IMUSensorFusion::reset ( )
pure virtual

Reset the filter to the identity quaternion.

Implemented in INDI::MadgwickFilter, and INDI::MahonyFilter.

◆ update()

virtual void INDI::IMUSensorFusion::update ( double  gx,
double  gy,
double  gz,
double  ax,
double  ay,
double  az,
double  mx,
double  my,
double  mz,
double  dt,
bool  useMag = true 
)
pure virtual

Perform one filter update step.

Parameters
gxGyroscope X-axis angular rate (rad/s)
gyGyroscope Y-axis angular rate (rad/s)
gzGyroscope Z-axis angular rate (rad/s)
axAccelerometer X-axis (m/s² or any unit — only direction used)
ayAccelerometer Y-axis
azAccelerometer Z-axis
mxMagnetometer X-axis (µT or any consistent unit)
myMagnetometer Y-axis
mzMagnetometer Z-axis
dtTime step in seconds since last update
useMagIf false the magnetometer data is ignored (6-DOF mode)

Implemented in INDI::MadgwickFilter, and INDI::MahonyFilter.


The documentation for this class was generated from the following file: