Skip to content
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: Terrain following/surface tracking in AUTO mode uses unfiltered rangefinder reading #12911

Closed
RickReeser opened this issue Nov 27, 2019 · 1 comment

Comments

@RickReeser
Copy link
Contributor

RickReeser commented Nov 27, 2019

When using a rangefinder for following terrain (TERRAIN_ENABLE = 0, WPNAV_RFND_USE = 1, mission waypoint altitude type is Terrain), the desired climb rate will respond to big spiky readings from the rangefinder as long as they fall within the configured _MIN_CM and _MAX_CM.

I found this by looking at logs submitted by a user on the Discuss forum: https://discuss.ardupilot.org/t/filter-for-rangefinder-signal/49453/13

I think it would be better to use a filtered rangefinder value so that obvious bad readings are rejected. The EKF already does the filtering (logged as NKF5.rng), so maybe we can use that instead.

See the desired climb rate bottom out when the rangefinder spikes high, even though the EKF rng value is stable. When the pilot switches to Loiter, this does not happen. The log is posted in the linked discussion.
image

Found on Copter 3.6.7.

@rmackay9 rmackay9 changed the title Terrain following/surface tracking in AUTO mode uses unfiltered rangefinder reading Copter: Terrain following/surface tracking in AUTO mode uses unfiltered rangefinder reading Nov 27, 2019
@rmackay9
Copy link
Contributor

rmackay9 commented Jul 8, 2021

This is resolved in Copter-4.1 (see code here) so closing. thanks again for the report!

@rmackay9 rmackay9 closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants