mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
update the fw_estimator not only after a correction, but after propagation as well (if correction is running at a lower rate).
When using AHRS_TRIGGERED_ATTITUDE_LOOP, really only trigger after fw_estimator was updated and not at Periodic_Frequency
This commit is contained in:
@@ -691,6 +691,10 @@ static inline void on_gyro_event( void ) {
|
||||
ahrs_update_accel();
|
||||
ahrs_update_fw_estimator();
|
||||
|
||||
#ifdef AHRS_TRIGGERED_ATTITUDE_LOOP
|
||||
new_ins_attitude = 1;
|
||||
#endif
|
||||
|
||||
#else //PERIODIC_FREQUENCY
|
||||
static uint8_t _reduced_propagation_rate = 0;
|
||||
static uint8_t _reduced_correction_rate = 0;
|
||||
@@ -723,8 +727,13 @@ static inline void on_gyro_event( void ) {
|
||||
INT_VECT3_ZERO(acc_avg);
|
||||
ImuScaleAccel(imu);
|
||||
ahrs_update_accel();
|
||||
ahrs_update_fw_estimator();
|
||||
}
|
||||
|
||||
ahrs_update_fw_estimator();
|
||||
|
||||
#ifdef AHRS_TRIGGERED_ATTITUDE_LOOP
|
||||
new_ins_attitude = 1;
|
||||
#endif
|
||||
}
|
||||
#endif //PERIODIC_FREQUENCY
|
||||
|
||||
@@ -732,10 +741,6 @@ static inline void on_gyro_event( void ) {
|
||||
LED_OFF(AHRS_CPU_LED);
|
||||
#endif
|
||||
|
||||
#ifdef AHRS_TRIGGERED_ATTITUDE_LOOP
|
||||
new_ins_attitude = 1;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static inline void on_mag_event(void)
|
||||
|
||||
Reference in New Issue
Block a user