Incorrect alt hold when rangefinder is installed and used

have any solutions been found to this problem?

No.

With the Copter 3.6 version I did lots of flights with rangefinder terrain follow last year without bigger issues.
This year, with Copter 4.03, I had lots of problems.

I had several unpredictional and strange failsafes with „missing terrain data“ errors in rangefinder (!) missions. Even old and well flown missions from last year, sometimes do not work any longer with the 4.0 version. Same machine, same configuration.

The flights itself are much more „jumpy“ with the copter hopping around. Often the flight behavior is terrible.

I raised an issue, also I wrote several times here in the forum, without solution. Sometimes I did not get a reaction at all.

To be honest, I have the impression that the whole terrain following thing with rangefinder support is broken in Copter 4.0.

I have not tested under Copter 3.6 only on 4.0.
What I find unfortunate is that the RNGFND_Gain is disabled in Auto mode because when I test in Loiter with the Gain Active mode, the behavior has nothing to do with it.

1 Like

Hi, does anyone know the way to get copters be at actual attitude with respect to rangefinder at low altitude (<= 10m). EKF altitude is always different from the actual altitude measured by rangefinder. I am flying in the flat terrain and I expect the copter should maintain at the height that rangefinder reads?

It works a lot better in master because it contains some fixes for this very situation. Are you willing to test github`s master branch?

1 Like

In current firmware 4.05 when range finder is on during loiter and position hold and alt hold modes copter changes the altitude rapidly, especially when ground is not flat and there are bushes or trees. So usually I just turn off the rangefinder to have more stable alt hold by auxiliary functions switch.
https://ardupilot.org/copter/docs/channel-7-and-8-options.html
Does anyone knows that even when the rangefinder is turn off by aux switch is it used for landing and for flow sensors ? Rangefinder is very useful for landing it is also needed for optical sensors. Is this function disables the rangefinder only for flying modes or for all functions in arducopter autopilot ?

@norim Does the issue same with 4.0.3 firmware.

Yes lidar is working the same on 4.0.3 firmware. There is possibility to make lidar measurements much less important for EKF. There is function “RNGFND_GAIN: Rangefinder gain” and you can set it for 0.01 and altitude will not change so rapidly during flying over bushes and trees. But “RNGFND_GAIN: Rangefinder gain” only works for Loiter, Poshold, alt-hold flight modes not for AUTO.

Abut landing wth rangefinder. There is some more info:
https://ardupilot.org/copter/docs/common-rangefinder-setup.html
https://ardupilot.org/copter/docs/terrain-following-manual-modes.html
https://ardupilot.org/copter/docs/terrain-following.html#terrain-following

Here I described another inconsistency with rangefinder altitude: Barometric desired Dalt has some smoothing when the control input is released to accomodate the inertia/vertical deceleration of the copter (I guess it is according to PSC_ACCZ).
But rangefinder desired DSalt does not have this, it keeps the desired altitude exactly at the point where the stick goes to zero.

This can cause quite big discrepancies between the two desired altitudes. Practically this will make the copter bounce back to DSalt when in range. When out of range we have dont have this, and the copter stays at the altitude it decelerated to. For me this is an inconsistent and therefore potentially dangerous flight behavior. When vertical speeds are high, those differences can be quite huge and the copter bounces back several meters. And during that time it is difficult for the pilot to make controlled corrections.

I think DSalt calculation should also take PSC_ACCZ into account, the same way Dalt seems to do. Discrepancies between DSalt and Dalt should be caused by rangefinder/terrain changes/sensor drift, but not by control inputs.

2 Likes