How to cancel altitude change when flying over obstacle?

Hello,

I’m using range finder and optical flow sensor for indoor navigation(no GPS).
I’m using companion computer to control the drone autonomously.
I want to fly over a table and I want to ignore altitude change in that case.
I found that the EK2_FLOW_USE have to be disabled and I need to limit the range finder altitude to fly over table without altitude change.

My problem is that I can’t use guided mode while EK2_FLOW_USE parameter is disabled.

Someone have an idea how to solve this problem?

Did you tryed to use ArduCopter 4.1-beta1 and EKF3 instead of EKF2?

Hi, Thank you for responding!

I tried V4.0.7 with EKF3 but I didn’t noticed different behaiver.
I found that when the EK3_FLOW_USE (also EK2_FLOW_USE) is enable for navigation (must for guided flight) I have a lot of altitude hold problems, sometimes it is in bad takeoff (fly way to high or bounced on the ground) it is very inconsistent, While i disable EK3_FLOW_USE the altitude hold works great.