Using sonar and PX4FLow

Hello,
I am using a optical flow sensor, PX4Flow for x,y stabilisation. The PX4Flow has a sonar attached as well. I am also using a Maxbotix 1240 EZ4 sonar in the quad for height measurement.

I am using Mission Planner and APM 3.5.5. When I am using only the sonar, everything is working and I am able to do altitude hold. But, when I connect my PX4Flow to the Pixhawk, I am getting errors showing on the Mission Planner. Errors: Post vert variance, EKF primary changed. The data in sonarrange is fluctuating going from 20 cm to 6.2 m suddenly even when quad is stable.

Is it because of the interference between of the 2 sonars? How to use both of them?
I am kind of reluctant to buy a light-based rangefinder due to high cost. Any suggestions?

Thanks in advance.

@ppoirier, can you help/suggest anything?

Thanks in advance.

P.S.: Sorry for tagging but am facing the problem since many days.

Hello
You oubviously have conflicting sonar reading.
Disable the one from PX4FLOW and carry on with configuration and tests.

Sonar are not really working well on quadcoptersbecause the signal gets “washed “ by the airflow

Hello
Answering your question of any suggestion and respecting the opinion of the ppoirier teacher.
I recently came using a TFmini LIDAR and how SONAR works very well and is very accurate

regards

How to disable the PX4Flow sonar so that the PX4Flow uses the external sonar? I could not find the documentation for it.
Also, altitude hold was quiet stable with the sonar, maybe because of using it in indoor environment. @ppoirier

Thanks for the suggestion @nomar
This one, right?

You have to physically remove it (disconnect or unsolder) from the PX4FLOW
Yes the TFMINI is a good alternative beacause its in the same price range and can be uses on serial device type or I2C witj this add-on : How to make the TFMINI rangefinder talk I2C