Copter-3.5-rc1: LIDAR-Lite 3 Rangefinder No Signal

After upgrading from 3.4.5, where the Rangefinder worked, to 3.5 RC1 it stopped working. I enabled EKF-3 with the same results. APM Planner 2.0.24 Quick Display no longer shows a “RANGEFINDER” option to display while the Mission Planner 1.3.41 “sonarrange” just reads zero’s. I didn’t read anything specific to 3.5 on the Rangefinder Wiki so I kept my parameters the same between the two firmwares:


Any thoughts would be helpful as I really wanted to use this as my primary height source and the release notes mention improvements have been made.

Hi Bob,

If you are using:

  • Maxbotix I2C sonar, set RNGFND_TYPE to 2
  • LidarLite, set RNGFND_TYPE to 3
  • TeraRange One, set RNGFND_TYPE to 14

This is related to us moving the drivers “In tree” which means we’re sharing more drivers between the pixhawk and linux boards (they were previously very separate).

Hopefully this will work. Thanks for testing!


I just loaded 3.5-rc1 and changed the type from 4 to 3 and now it reads. Are there any other recommended settings different from default to get it to function as my primary height sensor. If the info is discussed on another thread that would also be very helpful not to duplicate the discussion here. Thanks very much and for all the hard work.


Great that it’s working. I’ve added this to the list of wiki updates we need to do.
Using sonar as the EKF’s altitude source isn’t really discussed anywhere. I’m not sure why people want to do this actually.

If a downward facing lidar/sonar is attached then in Loiter, AltHold and PosHold flight modes the vehicle will maintain an altitude above the surface determined by the pilot’s throttle stick.

In autonomous modes (Auto, Guided) it’s possible to set the altitude target as an altitude-above-terrain.

In any case, it’s also possible to set the EKF to use the lidar instead of baro by setting EK2_ALT_SOURCE to 1. We generally don’t recommend doing this though because most people want one of the other above behaviours.

Yes it would be good to have it clear which version FW lidar lite switched from type 4 to 3. We were in the middle of winter so I’ve haven’t got any real testing done with 3.4.5 but this past fall with 3.4-rc2 in Auto and enabling terrain following I still was getting significant height loss trying to fly at 8m due to barometer drift so option 2 above wasn’t working so well. I’d have to abort the auto to avoid the ground. Now with 3.5-rc1 I have another option to at least force it to use RF if needed. If the temps hold for a while the way they are I expect to get more testing done this weekend.

It would be good to see a dataflash log. A loss in altitude could be caused by a lot of things - it might not be baro drift. I don’t think switching the EKF to use the range finder as it’s alt source is going to produce a good result in real-world conditions because it relies on the ground being mostly flat. If the vehicle is flying over obstructions, hills, etc I suspect it won’t work well. Anyway, feel free to try and I’m interested to hear how it goes.

Thanks Randy. Understood. When I can get back up again I’ll capture the logs.