Optical flow sensor with guided_no_gps mode

How to use optical flow sensor with guided_no_gps mode to hover and control the position and altitude ?

Take a look at this: The copter does not takeoff in Guided mode and EKF_GPS_TYPE = 3 (optical flow)

Thank you for your help.
When I connect the PX4Flow with pixhawk and after flashing firmware the parameters:
opt_m_x , opt_m_y, opt_x, opt_y are shown in mission planner.
In APM Planner that parameters are not shown and there are another parameters flow_x, flow_y but the values do not change.
I tried to move the sensor manually but the values of opt_x, opt_y rarely change and between these(0 -1 1 2) but opt_m_x , opt_m_y keep changing even when the sensor is not moving.
Is that normal?
There is not drone, just pixhawk and the sensor right now.

We normally use Mission Planner with px4flow because we are flashing a different formware on the device (as you should have previously done) and this neew code does not output the opt_x, opt_y.

Remember that in order to get opticall flow working with ardupilot (in flight) you need a separate range finder connected directly to the flight controler and showing distance measurement in Mission Planner.

1 Like

Thank you very much.
I read that notice on ardupilot wiki.Do you have an recommendation for range finder senor?

I am presently using the Garmin Lidar Lite V3, and I just ordered the newly released 20 meter tf mini from BENEWAKE , at 40$ its a deal… if it works ok.

1 Like

I have MB1043 HRLV-MaxSonar-EZ4 sonar. The same that comes with PX4Flow.
Can I use it as range finder with PX4Flow?
(I mean I have another MaxSonar not just the one comes with PX4Flow)

Yes that should work , either analog or serial driver

1 Like

I have this sensor.
I am confused how to connect it with pixhawk usibg I2C or ADC port .
Could you please help me?

Serial Output, PWM output, Analog Output.

Product features
MaxSonar-EZ4 detects objects from 0" to 254".
2.5-5.5V operation range. Low 2mA supply current.
42kHz Ultrasonic sensor with 20Hz reading rate.
Incredibly Small Package Sonar Range Finder.
Serial Output, PWM output, Analog Output.