diff --git a/ArduCopter/Parameters.cpp b/ArduCopter/Parameters.cpp index 162492ffd8..35ede3b051 100644 --- a/ArduCopter/Parameters.cpp +++ b/ArduCopter/Parameters.cpp @@ -1232,6 +1232,7 @@ const AP_Param::GroupInfo ParametersG2::var_info2[] = { // @DisplayName: EKF Failsafe filter cutoff // @Description: EKF Failsafe filter cutoff frequency. EKF variances are filtered using this value to avoid spurious failsafes from transient high variances. A higher value means the failsafe is more likely to trigger. // @Range: 0 10 + // @Units: Hz // @User: Advanced AP_GROUPINFO("FS_EKF_FILT", 8, ParametersG2, fs_ekf_filt_hz, FS_EKF_FILT_DEFAULT), diff --git a/ArduCopter/ekf_check.cpp b/ArduCopter/ekf_check.cpp index 47d9121be9..c05e7a279c 100644 --- a/ArduCopter/ekf_check.cpp +++ b/ArduCopter/ekf_check.cpp @@ -123,7 +123,7 @@ bool Copter::ekf_over_threshold() } uint32_t now_us = AP_HAL::micros(); - float dt = (now_us - last_ekf_check_us) / 1000000.0f; + float dt = (now_us - last_ekf_check_us) * 1e-6f; // always update filtered values as this serves the vibration check as well position_var = pos_variance_filt.apply(position_var, dt);