Optical flow and aiding mode

Hello,

I’m trying to get optical flow working. In overall it works quite fine, bit unstable tough, but probably because I’m using analog sonar at the moment.

But it’s little confusing the startup procedure. Read little source and as far as I understand then AC should start ‘relative aiding’ and/or start fusing optical flow. But I don’t understand yet how to get AC to that state. Sometimes it goes there and sometimes it doesn’t. And I haven’t been able to find pattern yet.

So what are the actions I have to perform for AC to start using optical flow and relative aiding.

All the neccesary steps in configuration is done. EKF3 is enabled, and GPS is disabled. And like i sayd, sometimes it goes to that mode, is able to ARM in POS_HOLD and fly with OF sensor.