void ahrs_update_mag(void) {
#if AHRS_MAG_UPDATE_ALL_AXES
  ahrs_update_mag_full();
#else
  ahrs_update_mag_2d();
#endif
}
Beispiel #2
0
void ahrs_update_mag(void) {
#ifdef AHRS_MAG_UPDATE_YAW_ONLY
  ahrs_update_mag_2d();
#else
  ahrs_update_mag_full();
#endif
}
Beispiel #3
0
void ahrs_update_mag(float dt) {
  // check if we had at least one propagation since last update
  if (ahrs_impl.mag_cnt == 0)
    return;
#if AHRS_MAG_UPDATE_ALL_AXES
  ahrs_update_mag_full(dt);
#else
  ahrs_update_mag_2d(dt);
#endif
  // reset mag propagation counter
  ahrs_impl.mag_cnt = 0;
}