30#define EST_F_RUNNING 0x01u
31#define EST_F_MAG_NEW 0x02u
32#define EST_F_ACC_GATED 0x04u
33#define EST_F_MAG_GATED 0x08u
34#define EST_F_STILL 0x20u
43 float mag_hard_iron[3];
70#define EST_TRACE_MAX 140u
71#define EST_OP_PROP 0x50u
72#define EST_OP_ACC 0x41u
73#define EST_OP_MAG 0x4Du
Windowed accelerometer mean, compensated for rotation.
static void on_init(const est_t *e, void *user)
static void on_state(const est_t *e, void *user)
Initial static window: references, noise and initial attitude.
void(* est_cb_t)(const est_t *e, void *user)
void est_process(est_t *e, const imu_event_t *ev, size_t n, float dt_sample)
dt_sample: IMU sample period measured by the MCU (s)
void est_init(est_t *e, const est_config_t *cfg, est_cb_t on_state, est_cb_t on_init, void *user)
Attitude IEKF on SO(3), C port of iekfAttitude.m.
IMU library: LSM6DSV16X (gyro + acc) with the LIS2MDL and the barometer (LPS22DF on the X-NUCLEO-IKS4...
float mag_latency_s
Age of the mag sample on arrival: the LIS2MDL converts at f_lis, the sensor hub re-reads it at f_sh >...
float calib_gyro_still
rad/s
float still_acc_tol
Stillness detector: if |a| ~ nominal and |omega| small for still_time_s, an external acceleration is ...
uint8_t gyro_per_step
2 with ODR 1920 Hz, 1 with 960 Hz
float still_gyro_thr
rad/s, e.g.
iekf_config_t ekf
sigma_acc/sigma_mag overwritten by calib
uint16_t calib_samples
mag samples while standing still
uint8_t steps_per_acc
4 -> acc update at 240 Hz
float t
s, estimation time since RUN start
est_cb_t on_init
once, at end of calibration
uint8_t flags
EST_F_*, cleared after each callback.
float dth[3]
step accumulators
est_trace_t trace
cleared after each on_state
float still_t
s, how long the board has been still
uint32_t win_count
acc windows since RUN start
est_cb_t on_state
240 Hz, after the acc update
float omega[3]
last step gyro, bias removed
float acc_mean[3]
latest quantities (telemetry / calibration)