Local position estimate with px4flow, but disable sonar

Dear all,
I have a question about using px4flow with LPE. In my opinion, LPE employs kalman filter to ‘estimate’ the position including height, x and y bias, right? So, is it possible that we can disable the sonar on px4flow and only uses camera to get the pixel flow and let the estimator do the height estimation only based on baro. Will this manner give a precise height estimation?

PS: The reason is that if we want to fly indoors, sonar can only give us a maximum ranging of 5 meters. If a higher altitude is desirable, we can only resort to baro. That’s why I ask this question. Any advise is appreciated. Thanks.

You can disable the sonar, but you need a other range finder, in my opinion LeddarOne is very useful. You can modify the code and use the baro for to estimate the altitude, but his accuracy is not good and maybe you expend so much time doing this.

Hi @doctorluhang,
I am not reading the code wrongly, the flow module does not use the sonar directly. The sonar reading get fused separately with (or without) baro, then flow would then use the estimated z to estimate velocity. (Hope this is not confusing)
So I guess at high altitude, when the quality of sonar is bad, baro will be “automatically” selected via the EKF.