/* Runtime bias & scale estimation for the magnetometer. */ #include #include typedef struct { fix16_t bias_x; fix16_t bias_y; fix16_t bias_z; fix16_t scale_x; fix16_t scale_y; fix16_t scale_z; } mag_calib_t; extern mag_calib_t mag_calib; void mag_calib_init(); void mag_calib_update(const v3d *mag);