mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
ekf2: optical flow control always use provided flow gyro (with bias applied)
This commit is contained in:
parent
291af17b64
commit
064ea0d465
@ -219,13 +219,13 @@ bool Ekf::calcOptFlowBodyRateComp()
|
||||
|
||||
// calculate the bias estimate using a combined LPF and spike filter
|
||||
_flow_gyro_bias = _flow_gyro_bias * 0.99f + matrix::constrain(measured_body_rate - reference_body_rate, -0.1f, 0.1f) * 0.01f;
|
||||
|
||||
// apply gyro bias
|
||||
_flow_sample_delayed.gyro_xyz -= (_flow_gyro_bias * _flow_sample_delayed.dt);
|
||||
|
||||
is_body_rate_comp_available = true;
|
||||
}
|
||||
|
||||
// apply gyro bias
|
||||
_flow_sample_delayed.gyro_xyz -= (_flow_gyro_bias * _flow_sample_delayed.dt);
|
||||
|
||||
is_body_rate_comp_available = true;
|
||||
|
||||
} else {
|
||||
// Use the EKF gyro data if optical flow sensor gyro data is not available
|
||||
// for clarification of the sign see definition of flowSample and imuSample in common.h
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user