ekf2: fix calcOptFlowBodyRateComp() gyro bias

- adjust flow sample gyro_rate immediately after popping from ring
   buffer
 - always update flow gyro bias (calcOptFlowBodyRateComp()) regardless
   of flow quality or magnitude
This commit is contained in:
Daniel Agar
2024-06-26 16:40:30 -04:00
parent 4d324da9f8
commit 7047f9441c
3 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -2043,7 +2043,7 @@ void EKF2::PublishOpticalFlowVel(const hrt_abstime &timestamp)
_ekf.getFlowGyro().copyTo(flow_vel.gyro_rate);
_ekf.getFlowGyroBias().copyTo(flow_vel.gyro_bias);
_ekf.getRefBodyRate().copyTo(flow_vel.ref_gyro);
_ekf.getFlowRefBodyRate().copyTo(flow_vel.ref_gyro);
flow_vel.timestamp = _replay_mode ? timestamp : hrt_absolute_time();