Reject Position Control ( pixhawk 2 )

We have some unknown problems to compile your code and we would be pleased if you could help us to fix it.
I have dealt with the problem of Position Control Mode actually the system rejects this mode.
We do not have GPS and want to run the Position Control with optical Flow Sensor.
We cannot find the LPE-GPS-on in Qground to turn it off, so how can we turn off the GPS?
We set the sys_group in LPE mode but again it rejects the position control mode. Do you know the reason?

Pixhawk version 2

The pixhawk will not enter position control mode unless vehicle_local_position_ned messages (a.k.a. local_position_ned in mavlink) are regularly published by the estimator (LPE, in your case), with the flag xy_valid set.

You can disable the GPS in the LPE estimator by seting the parameter LPE_GPS_ON to zero. Also, check the value for LPE_FLW_QMIN, and make sure that this value is at or below the average quality measurement reported by the optical flow camera.

Also, you can try using EKF2 instead of LPE, if you do so make sure to change the EKF2_AID_MASK parameter to disable GPS and enable optical flow fusion.

Good luck.

@Joseph_Garret_Sulliv, why trying EKF2 instead of LPE? The latter seems to work better for indoor flights though.

BTW, LPE_GPS_ON is not longer listed by QGC when using the v1.6.0 rc1 firmware (SYS_MC_EST_GROUP set to LPE).

I just recommend trying an alternate estimator to see if it makes any difference. My gut tells me that the reason why you can’t enter position control mode is because the estimator is not publishing the necessary data. If it works with EKF2, then perhaps something was changed in the LPE logic recently.

It might also be worth trying a previous firmware release, instead of the most up-to-date release candidate.

Hello AI_B.
I tryed to set SYS_MC_EST_GROUP=ekf2 and EKF2_AID_MASK=2. But the POSHOLD is still reject.
I used the v1.5.5 stable for pixhawk.