mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 17:09:06 +08:00
reset the newest output sample for all possible resets
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
parent
238d947239
commit
f80b3481a4
@ -153,6 +153,10 @@ void Ekf::controlExternalVisionFusion()
|
||||
_output_buffer.push_to_index(i,output_states);
|
||||
}
|
||||
|
||||
// apply the change in attitude quaternion to our newest quaternion estimate
|
||||
// which was already taken out from the output buffer
|
||||
_output_new.quat_nominal *= _state_reset_status.quat_change;
|
||||
|
||||
// capture the reset event
|
||||
_state_reset_status.quat_counter++;
|
||||
|
||||
|
||||
@ -293,6 +293,16 @@ void Ekf::resetHeight()
|
||||
|
||||
}
|
||||
|
||||
// apply the change in height / height rate to our newest height / height rate estimate
|
||||
// which have already been taken out from the output buffer
|
||||
if (vert_pos_reset) {
|
||||
_output_new.pos(2) += _state_reset_status.posD_change;
|
||||
}
|
||||
|
||||
if (vert_vel_reset) {
|
||||
_output_new.vel(2) += _state_reset_status.velD_change;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// align output filter states to match EKF states at the fusion time horizon
|
||||
@ -469,6 +479,10 @@ bool Ekf::resetMagHeading(Vector3f &mag_init)
|
||||
_output_buffer.push_to_index(i,output_states);
|
||||
}
|
||||
|
||||
// apply the change in attitude quaternion to our newest quaternion estimate
|
||||
// which was already taken out from the output buffer
|
||||
_output_new.quat_nominal *= _state_reset_status.quat_change;
|
||||
|
||||
// capture the reset event
|
||||
_state_reset_status.quat_counter++;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user