Skip to content

Commit

Permalink
EKF: relax optical flow on ground motion checks
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough committed May 7, 2018
1 parent 24b005e commit 02963a8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions EKF/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,10 @@ void Ekf::controlOpticalFlowFusion()
{
// Check if motion is un-suitable for use of optical flow
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 > 15.0f)
|| (_accel_mag_filt < 5.0f)
|| (_ang_rate_mag_filt > 0.5f)
|| (_R_to_earth(2, 2) < 0.866f));

bool motion_is_excessive = ((_accel_mag_filt > 14.7f)
|| (_accel_mag_filt < 4.9f)
|| (_ang_rate_mag_filt > _params.flow_rate_max)
|| (_R_to_earth(2,2) < 0.866f));
if (motion_is_excessive) {
_time_bad_motion_us = _imu_sample_delayed.time_us;

Expand Down

0 comments on commit 02963a8

Please sign in to comment.