Cannot disarm in loiter mode using optical flow and range finder with Copter4.3.6

Hardware Config:

  1. Kakute H7 Mini with Copter4.3.6
  2. Mtf-01 optical flow and range finder module.

I’m trying to fly with loiter mode with ekf2, however I failed to disarm in Loiter mode and encountered this error message: Prearm: Need Position Estimate:

However, the optical flow and the range finder have been successfully connected to the autopilot through mavlink. I could disarm in Flowhold mode and the quadrotor can hover stably (but the dynmic performance is not satisfactory, so I wanted to use Loiter mode.). The parameters related to EK2, optical flow and rangefinder are listed as follows:


L`K$Q_NHQB@2%MBRFZ)K}H

I found in some videos that the quad can disarm in Loiter mode without gps, just set EK2_GPS_TYPE=No GPS and use optical flow and rangefinder is enought , however it does not works in my case.

Start here
https://ardupilot.org/copter/docs/common-non-gps-navigation-landing-page.html#non-gps-navigation

Is there some special reason you are using EKF2 instead of EKF3?

When using EKF3, I can disarm in loiter mode, but the stopping performance is not satisfactory (the quad drifted a lot instead of hovering after I stopped commanding the quad to move).

Maybe the problem lies in position control tunning, not EKF, but I want to try ekf2 instead of ekf3 first.
In addition, when using px4 firmware, the optical flow works very well in both hovering and dynamic performance without tunning any parameters and I dont’t know why.

You can try it out using my configuration parameters in the video
https://youtu.be/KnAwm2J7u3c?feature=shared