I don’t have my Pixhawk 2.1 yet…
But on Pixhawk, first, make sure the precision landing isn’t on through mission planner. This does wacky things to mine - and I don’t believe it’s supported for that anyway.
This behavior used to occur if the Terrain Follow option was enabled, and craft height would change as the terrain below got higher. I think it’s the setting under WPNAV - WP_RFND_USE - set to disable.
Download the Lightware terminal (if you haven’t already).
If you’ve messed with setting on the lidar itself - reset them. Unless you’re using this on an analog input which you aren’t if you’re connect to serial, they don’t have any effect that I’ve seen (most are ANALOG-this and that)
The only one I’ve ever changed is the Zero Datum Offset - and you WANT to change this. Measure the distance from ground to the face of the Lidar in CM, plug this value into the onboard lidar setup menu.
In mission planner, set the following:
RNGFND_SCALING: Don’t Change this
RNGFND_OFFSET: leave at default
RNGFND_FUNCTION: Leave as is should be linear
RNGFND_MIN_CM: I set this to 1
RNGFND_MAX_CM: I set this to 12000
RNGFND_SETTLE: leave at default
RNGFND_GNDCLEAR: 0 (the zero datum offset sends 0 altitude when you’re at the measured distance to ground)
RNGFND_GAIN: I would leave this at default. If you’re still having issues, you can try to bump it .4 either way…but high settings mess with mine.
I wouldn’t suggest messing with any of the x y z orientations stuff.
Try this out and see. Also make sure you have stable 5V power going to it. Hope it helps.