Altitude continue increasing while land mode was requested

Dear All,

After beeing in stabilize mode, my quadcopter climbed at 22m above ground, then when switching to land mode, it continue climbing around 10 m higher before starting to climb down linearly. Please check out my log here:

Why did the quadcopter to start climbing down right from the 22m ?

Any feedback on this would appreciated.

Something similar when RTL activated. Did your drone climbed over the geofence max altitude? Do you have any range finder attached? RTL causes Fly Away with range sensor I2C Maxbotix - safety warning

Hello Chris,

Absolutely glad to have obtained the slightest response on this in this forum.

Yes I do confirm I have a maxbotix like range finder sensor. it is this one:

it is supposed to come as a direct replacement of the maxbotix I2c sonar. Howver the geofence was disactivated because a message told me that fences requires position to be known (this happens even when having gps 3d fix=> did not understand).

1/ is setting RNGFND_MAX_CM=250 a solution?
2/Otherwise should I remove this rangefinder sensor ?

So grateful chris !!


hi Tony, I bought the same sensor from AliExpress and then an original from Robotshop, same result, max distance for outdoor for me was 200cm. And as there is an open issue for more than a year that is not solved I highly recommend every one NOT to utilize this range finder for outdoor flights until this issue is resolved. And please add a message explaining your experience in the github issue!

Hello Chris,

are we absolutely sure that the problems stems from this sensor aka if you remove it do you get the same issue ?
Ok to warn everybody with this.


@tony2 No, I’m not saying the problem is THIS sensor, I’m saying that there is a real problem which can lead to an unexpected behavior like flying away when there is a sensor attached. And the proposal suggested by @tomlauzon in the Github could be the solution:

Here’s an idea: when within range (i.e distance measured is not constant) calculate the difference between EKF altitude and rangefinder, as a reference. If this difference changes beyond a threshold (e.g. 3m) assume that the rangefinder limit has been reached and don’t use rangefinder anymore. Recalculate the reference difference every minute or so because of baro drift during longer flights.

but I highly suggest you to report your problem in the Github, thanks,