mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
[subsystem ins] only update vert filter with baro measurement when not realigning, did a wrong update in that case
This commit is contained in:
@@ -182,8 +182,6 @@ void ins_update_baro() {
|
||||
ins_qfe = baro.absolute;
|
||||
ins_baro_initialised = TRUE;
|
||||
}
|
||||
ins_baro_alt = ((baro.absolute - ins_qfe) * INS_BARO_SENS_NUM)/INS_BARO_SENS_DEN;
|
||||
float alt_float = POS_FLOAT_OF_BFP(ins_baro_alt);
|
||||
if (ins_vf_realign) {
|
||||
ins_vf_realign = FALSE;
|
||||
ins_qfe = baro.absolute;
|
||||
@@ -198,7 +196,11 @@ void ins_update_baro() {
|
||||
ins_enu_speed.z = -ins_ltp_speed.z;
|
||||
ins_enu_accel.z = -ins_ltp_accel.z;
|
||||
}
|
||||
vff_update(alt_float);
|
||||
else { /* not realigning, so normal update with baro measurement */
|
||||
ins_baro_alt = ((baro.absolute - ins_qfe) * INS_BARO_SENS_NUM)/INS_BARO_SENS_DEN;
|
||||
float alt_float = POS_FLOAT_OF_BFP(ins_baro_alt);
|
||||
vff_update(alt_float);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user