void ahrs_update(AHRS_STATE_t *self,
                 float period,
                 float *data);

ahrs_update updates the orientation estimation in the AHRS self. The elapsed time between the previous update and this update is passed as period seconds. The data for this update is passed in data:

If the magnetometer measurement is not available and you wish to fuse only accelerometer and gyroscope, you must set the magnetometer values to an IEEE not-a-number (NaN) which is defined as NAN in <math.h. If the accelerometer measurement is invalid (i.e. any axis measurement is NaN or all axis measurements are zero), the AHRS orientation estimation is not updated.


The data held in data is modified during AHRS update.

Thread Safety

ahrs_update is thread safe.