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 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.
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.
Found on Copter 3.6.7.