ArduPilot 5-Inch Drone Using Optical Flow and Rangefinder for Indoor Position Hold – Altitude Oscillations

Hi @jhon_mesa,

Txs for the testing and update. It’s good to hear either way regarding the experimental branch that you tested.

Re the position drift when the vehicle is yawed, this is a very common problem with optical flow sensors. I think some sensors don’t handle the yaw rotation so a rotating scene leads to some x or y movement. I think a really good sensor could perhaps handle this by using an onboard yaw gyro to essentially rotate the previous scene before comparing it to the latest scene.

In practice I try to keep the vehicle’s yaw movements very slow when using optical flow. I think your idea of testing that EK3_FLOW_DELAY is accurate could also help a bit.

If you use a compass it will be fine.