mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:17:35 +08:00
EKF: relax optical flow on ground motion checks
This commit is contained in:
+4
-6
@@ -339,12 +339,10 @@ void Ekf::controlOpticalFlowFusion()
|
|||||||
{
|
{
|
||||||
// Check if motion is un-suitable for use of optical flow
|
// Check if motion is un-suitable for use of optical flow
|
||||||
if (!_control_status.flags.in_air) {
|
if (!_control_status.flags.in_air) {
|
||||||
// Detect if the vehicle is on the ground and is being excessively tilted, shaken or rotated.
|
bool motion_is_excessive = ((_accel_mag_filt > 14.7f)
|
||||||
bool motion_is_excessive = ((_accel_mag_filt > 15.0f)
|
|| (_accel_mag_filt < 4.9f)
|
||||||
|| (_accel_mag_filt < 5.0f)
|
|| (_ang_rate_mag_filt > _params.flow_rate_max)
|
||||||
|| (_ang_rate_mag_filt > 0.5f)
|
|| (_R_to_earth(2,2) < 0.866f));
|
||||||
|| (_R_to_earth(2, 2) < 0.866f));
|
|
||||||
|
|
||||||
if (motion_is_excessive) {
|
if (motion_is_excessive) {
|
||||||
_time_bad_motion_us = _imu_sample_delayed.time_us;
|
_time_bad_motion_us = _imu_sample_delayed.time_us;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user