How does the firmware handle faulty lidar measurements?

Hi @tumbili, I am having similar troubles with ll40ls used as primary source of information in the height estimation process.
In particular, I have a drift problem in the height estimation, and after lot of flight tests (copter driven by RC in ALT mode and even moved manually with/without arming the system) my feeling is that the range finder is not used by the EKF2 for some reason (the most likely for consistency check).
Have you got any idea about how to solve the problem?
Here the original post in the forum: Altitude tracking drift in Altitude mode
I am available for any further clarification.