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:
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).
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.
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.
Bob,
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.