EKF: Fix bug causing incorrect yaw variance value to be used

This bug causes the variance of the Z axis rotation vector uncertainty to not be reset to the correct value.
This commit is contained in:
Paul Riseborough 2019-01-04 20:30:51 +11:00 committed by Lorenz Meier
parent 48d83f3bcb
commit c032126745
1 changed files with 1 additions and 1 deletions

View File

@ -729,7 +729,7 @@ bool Ekf::resetMagHeading(Vector3f &mag_init)
}
// update the yaw angle variance using the variance of the measurement
if (!_control_status.flags.ev_yaw) {
if (_control_status.flags.ev_yaw) {
// using error estimate from external vision data
angle_err_var_vec(2) = sq(fmaxf(_ev_sample_delayed.angErr, 1.0e-2f));