EKF: resetGpsAntYaw() fix double promotion

This commit is contained in:
Daniel Agar 2020-05-20 12:28:32 -04:00
parent 39c09b8092
commit 600240d95f
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ bool Ekf::resetGpsAntYaw()
// update the quaternion state estimates and corresponding covariances only if
// the change in angle has been large or the yaw is not yet aligned
if(fabs(yaw_delta) > math::radians(15.0f) || !_control_status.flags.yaw_align) {
if(fabsf(yaw_delta) > math::radians(15.0f) || !_control_status.flags.yaw_align) {
const float yaw_variance = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f));
resetQuatStateYaw(measured_yaw, yaw_variance, true);
}