elk_helper: use ISFINITE macro instead of isfinite()

This commit is contained in:
TSC21 2020-03-20 21:25:44 +00:00 committed by Lorenz Meier
parent 20c3db69e4
commit 870ec380f1

View File

@ -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);
}
}