diff --git a/EKF/ekf.cpp b/EKF/ekf.cpp index 7336dbb200..d70dde3afc 100644 --- a/EKF/ekf.cpp +++ b/EKF/ekf.cpp @@ -324,7 +324,7 @@ void Ekf::calculateOutputStates() const float dt_scale_correction = _dt_imu_avg / _dt_ekf_avg; // Apply corrections to the delta angle required to track the quaternion states at the EKF fusion time horizon - const Vector3f delta_angle{imu.delta_ang - _state.delta_ang_bias * dt_scale_correction + _delta_angle_corr}; + const Vector3f delta_angle(imu.delta_ang - _state.delta_ang_bias * dt_scale_correction + _delta_angle_corr); // calculate a yaw change about the earth frame vertical const float spin_del_ang_D = _R_to_earth_now(2, 0) * delta_angle(0) + @@ -363,7 +363,7 @@ void Ekf::calculateOutputStates() } // save the previous velocity so we can use trapezoidal integration - const Vector3f vel_last{_output_new.vel}; + const Vector3f vel_last(_output_new.vel); // increment the INS velocity states by the measurement plus corrections // do the same for vertical state used by alternative correction algorithm diff --git a/EKF/gps_checks.cpp b/EKF/gps_checks.cpp index 67939777f8..f51994449d 100644 --- a/EKF/gps_checks.cpp +++ b/EKF/gps_checks.cpp @@ -134,7 +134,7 @@ bool Ekf::gps_is_good(const gps_message &gps) _gps_check_fail_status.flags.sacc = (gps.sacc > _params.req_sacc); // check if GPS quality is degraded - _gps_error_norm = fmaxf((gps.eph / _params.req_hacc) , (gps.epv / _params.req_vacc)); + _gps_error_norm = fmaxf((gps.eph / _params.req_hacc), (gps.epv / _params.req_vacc)); _gps_error_norm = fmaxf(_gps_error_norm , (gps.sacc / _params.req_sacc)); // Calculate time lapsed since last update, limit to prevent numerical errors and calculate a lowpass filter coefficient