mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 07:28:54 +08:00
failure detector: fix imbalanced prop metric time interval
This commit is contained in:
committed by
Daniel Agar
parent
89b81b0bd6
commit
eb80e0410c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user