failure detector: fix imbalanced prop metric time interval

This commit is contained in:
Thomas Stastny 2022-11-24 15:06:06 +01:00 committed by Daniel Agar
parent 89b81b0bd6
commit eb80e0410c
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ void FailureDetector::updateImbalancedPropStatus()
if ((imu_status.accel_device_id != 0)
&& (imu_status.accel_device_id == _selected_accel_device_id)) {
const float dt = math::constrain((float)(imu_status.timestamp - _imu_status_timestamp_prev), 0.01f, 1.f);
const float dt = math::constrain(float(imu_status.timestamp - _imu_status_timestamp_prev) / 1_s, 0.01f, 1.f);
_imu_status_timestamp_prev = imu_status.timestamp;
_imbalanced_prop_lpf.setParameters(dt, _imbalanced_prop_lpf_time_constant);