mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 08:01:35 +08:00
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:
@@ -134,7 +134,7 @@ public:
|
||||
|
||||
const Vector3f getFlowGyro() const { return _flow_sample_delayed.gyro_rate; }
|
||||
const Vector3f &getFlowGyroBias() const { return _flow_gyro_bias; }
|
||||
const Vector3f &getRefBodyRate() const { return _ref_body_rate; }
|
||||
const Vector3f &getFlowRefBodyRate() const { return _ref_body_rate; }
|
||||
#endif // CONFIG_EKF2_OPTICAL_FLOW
|
||||
|
||||
float getHeadingInnov() const
|
||||
@@ -846,7 +846,7 @@ private:
|
||||
float calcOptFlowMeasVar(const flowSample &flow_sample) const;
|
||||
|
||||
// calculate optical flow body angular rate compensation
|
||||
void calcOptFlowBodyRateComp(const imuSample &imu_delayed);
|
||||
void calcOptFlowBodyRateComp(const flowSample &flow_sample);
|
||||
|
||||
float predictFlowRange() const;
|
||||
Vector2f predictFlow(const Vector3f &flow_gyro) const;
|
||||
|
||||
Reference in New Issue
Block a user