Altitude using Tfmini Lidar

FIRMWARE : Arducopter 3.6.8
Pixhawk : Pixhawk 2.1 cube

I have connected the tfmini lidar to the gps2 port of the pixhawk.
Although I am able to get a correct reading of the rangefinder altitude, the relative altitude is using barometer (maybe fused with the lidar data).
The problem is that the relative altitude keeps fluctuating due to the barometer, which I don’t want because below a certain height I want my altitude data to be purely lidar based. So the parameters are as follows:
EKF2_ALT_SOURCE = use rangefinder
EKF2_RNG_USE_HGT = 15%
RNGFND_MAX_CM = 700
RNGFND_MIN_CM = 20
RNGFND_TYPE = 20

But there seems to be a heavy effect of the barometer, can we decrease that weight or purely use rangefinder without fusing below a certain altitude
other values are default

@sidbh

@Pence, Welcome to the community!
So, per your parameters, the EKF will use the Rangefinder as the source of height only below 105cm(1.05m) i.e. 15% of MAX range i.e. 700cm only. If you think the Rangefinder data is not being fused even when the conditions are met, please share the dataflash log, so we can analyse further.

Have you found the issue as I need the same and I did not succeed

  1. I am trying to use TFLidar with pixhawk fmu 5 to be as the source for altitude, I removed all usage of altitude from the gps and stopped the barometer. The quadcopter does not also stabilize for altitude and oscillates after a while. I do not see the were is the issue. I tested the distance sensor, position NED local and seems it is good but when flying it seems that something happen (seems still fuse someting, I suspect the GPS). The sensor reads the oscillation but why I do not know. Please help, this is the log https://review.px4.io/plot_app?log=a475911c-5d31-488c-aeba-ecdf4ff0bac6