Good evening everyone,
We are getting more into the 4.1 version which actually has pretty good features. Today we have been trying to use the lane switching between compass yaw and GPS position, and compass yaw and optical flow (PX4flow). We set the source parameters as follow:
Before flying, we performed a ground test which was to arm in loiter mode, lift the drone and carry it around, and then switch to lane 2 that is the one with the optical flow. After switching, it triggered the EKF failsafe because EKF variance. Taking a look at the logs, it seems that there are not corrections at all after the switching:
If I try to arm selecting the second set of sources, it does not arm and throws a pre-arm message about not having position estimation. From my experience with the EKF2, I do recall that an origin and a home were required for triggering the position estimation using the optical flow sensor. I suspect this problem is solved when we have GPS in the first lane since it sets the home and the origin as we could see in QGC.
I gather I am missing something in the configuration, may be we need to set differently the EK3_SRC2_POSXY. Also, we noticed, for long time, that the quality parameter of the PX4flow sensor is always 255 which means is always healthy. This is something that happens if we flash the version that is available for arducopter in QGC; an KLT algorithm one. When we compile the firmware, something we have done for changing the default parameters of the PX4flow since it does not have EEPROM, we noticed that actually the quality parameter changes depending on how good is the matching between frames, is it somehow used this quality parameter for any check in Arducopter? We got it when we use the hex optical flow sensor. I can help to take a look at the commit it is currently used and see what may be the problem.