diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index feac851d91..2a408a63e4 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -1799,7 +1799,7 @@ void Ekf::runYawEKFGSF() yawEstimator.update(_imu_sample_delayed, _control_status.flags.in_air, TAS); // basic sanity check on GPS velocity data - if (_gps_data_ready && _gps_sample_delayed.vacc > FLT_EPSILON && isfinite(_gps_sample_delayed.vel(0)) && isfinite(_gps_sample_delayed.vel(1))) { + if (_gps_data_ready && _gps_sample_delayed.vacc > FLT_EPSILON && ISFINITE(_gps_sample_delayed.vel(0)) && ISFINITE(_gps_sample_delayed.vel(1))) { yawEstimator.setVelocity(_gps_sample_delayed.vel.xy(), _gps_sample_delayed.vacc); } }