Use optical flow via mavlink

Hi,

Regarding the Compass use, i based it on this thread (Integration of ArduPilot and VIO tracking camera (Part 4): non-ROS bridge to MAVLink in Python).
Have tried to enable the compass but that didn’t help either, the ekf is still not initializing and working properly.
I am planning to use the Loiter mode.
Currently i am trying a different approach of sending the optical flow raw data via mavlink and using the EKF3. It looks promising although I would have preferred sending velocity and not optical flow.

I think I was unclear regarding the altitude. My problem wasn’t giving the altitude commands but providing the APM the altitude data from my own sensor via mavlink.

Thanks for your help