mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 01:10:35 +08:00
ekf_helper: fuse double if
This commit is contained in:
committed by
Mathieu Bresciani
parent
0e3bf2872c
commit
75c49b2082
+3
-5
@@ -295,15 +295,13 @@ void Ekf::resetHeight()
|
|||||||
P.uncorrelateCovarianceSetVariance<1>(6, 10.0f);
|
P.uncorrelateCovarianceSetVariance<1>(6, 10.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the reset amount and time to be published
|
|
||||||
if (vert_pos_reset) {
|
if (vert_pos_reset) {
|
||||||
|
// store the reset amount and time to be published
|
||||||
_state_reset_status.posD_change = _state.pos(2) - old_vert_pos;
|
_state_reset_status.posD_change = _state.pos(2) - old_vert_pos;
|
||||||
_state_reset_status.posD_counter++;
|
_state_reset_status.posD_counter++;
|
||||||
}
|
|
||||||
|
|
||||||
// apply the change in height / height rate to our newest height / height rate estimate
|
// apply the change in height / height rate to our newest height / height rate estimate
|
||||||
// which have already been taken out from the output buffer
|
// which have already been taken out from the output buffer
|
||||||
if (vert_pos_reset) {
|
|
||||||
_output_new.pos(2) += _state_reset_status.posD_change;
|
_output_new.pos(2) += _state_reset_status.posD_change;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user