-
Notifications
You must be signed in to change notification settings - Fork 16.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copter: improve landing detection by using filtered acceleration #13639
Copter: improve landing detection by using filtered acceleration #13639
Conversation
was called update_throttle_thr_mix also minor formatting fixes
was called update_throttle_thr_mix also minor format fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a safe change that will handle high accel noise better.
@andyp1per, no, the throttle is definitely not zero. The issue is quite obvious by graphing the RCOU message values in master. At least in my tests they produced perfectly identical outputs for each motor. It's as if there's no noise in the IMU at all. |
Ok, do you have a test I can try? |
#13649 should fix the noise issues in master |
@andyp1per, awesome, thanks very much for the fix related to (missing) accel noise in master! |
Did it work? |
I've gone ahead and merged this but as discussed on the dev call I'll attempt to make a similar fix for plane. #13664 @andyp1per, yes, it's looking much better now, thanks! |
This has been successfully flight tested now and seems to greatly improve the landing detection for the one vehicle in question at least. |
This is included in Copter-4.0.4-rc1 |
This PR modifies the update_throttle_mix() method so that it uses filtered accelerations (filtered at 1hz) instead of the raw accelerations. This is consistent with the update_land_detector() function and makes the landing detector more resistant to high vibrations.
High vibrations leading to a failed landing detector has been seen in the logs of at least one user.
Perhaps @lthall can say whether there's any downsides to the additional filtering.
Below is a test with this change applied to Copter-3.6.12 (see below for why I didn't use master) after setting SIM_ACC_RND = 20
![before-after](https://user-images.githubusercontent.com/1498098/75020477-2b098480-54d6-11ea-9116-d79176606fdd.png)
This PR also makes some minor formatting and function name changes to both Copter and Plane. These are non-functional changes.
Note: we should probably make the same change in Plane but I could not immediately figure out where to introduce the change
Note2: I attempted to test with master but apparently there are no longer any vibrations in master? @andyp1per can you check that your changes to SITL haven't disabled vibration by default?