Optical Flow + Rangefinder setup still says “PreArm: Need Position Estimate”

Hey all,

I’m running a GPS-less setup Copter V4.6.2 using optical flow and rangefinder, but I can’t switch to Loiter or PosHold — I keep getting:

PreArm: Need position estimate

Setup:

Sensor: MicoAir MTF-01 (UART, MSP/32)

GPS disabled

EKF3 enabled

No compass issue

Did “Set EKF Home Here” in Mission Planner

Main EKF settings:

EK3_SRC1_POSXY = 0 (None)

EK3_SRC1_VELXY = 5 (Optical Flow)

EK3_SRC1_POSZ = 2 (RangeFinder)

EK3_SRC1_VELZ = 0 (None)

EK3_SRC1_YAW = 1 (Compass)

EK3_SRC_OPTIONS = 0

AHRS_GPS_USE = 0

Both the flow and rangefinder are reading correctly, but ArduCopter still won’t generate a valid position estimate and won’t allow Loiter or PosHold.

Question:
What’s blocking the EKF from producing a position estimate when optical flow and rangefinder are active?

Log file is already attached.

I am not sure but by reading the wiki you have to “Set EKF Origin Here”

So I would try this

1 Like

Apologies for my inaccurate wording. I meant to say I performed “Set EKF Origin Here” and it was still showing the PreArm: Need position estimate

Check the height downward rangefinder reading. Is it less than 3 cm?

Is the Geofencing turns ON?

1 Like

Hi Jai,

if you’re referring to the physical height of the rangefinder from the ground, it’s about 2cm. I also tried lifting the drone up with my hand to make sure it’s higher than 2cm from ground and nothing really happened.

Also Related: My RNGFND1_MIN_CM = 1

Re Geofencing: No Geofencing configured nor activated.

Have you tried changing the RNGFND1_GNDCLEAR?

1 Like

Yes, so I put it at 1 & 5 cm; it didn’t change anything.

Also, I gotta say, when I installed a GPS/Compass module, and got GPS fix, the PreArm: Needs position estimate goes away and I was able to arm. Once armed, I switch EKF source to the OptFlow sensor and it successfully switched to PosHold, however, it doesn’t seem to work. the drone was drifting away and no correction was made to bring it back.

I performed the Log based Calibration, and set up parameters (Attached) as shown in the Optical Flow Sensor Testing and Setup page. Kind of out of ideas at this point.

4inParams116325_1.param (19.4 KB)

You have installed a GPS module, why are you not considering inflight calibration?