Indoor flight with Optical flow issue

Hello,

I’m using MRO Pixracer Pro with HEX Here flow sensor (optical flow).
I’m having problems with flying forward and backward in a straight line.


In this screenshot I tried to flew only back and forward. I used only the pitch in the remote. as you can see in the screenshot it actually indicate the real situation.

I tried to change all the params that belong to the optical flow that i found in the docs and in the mission planner full parameter list. but noting change this problem.

I found that the slower i move the bigger the drift to the left and right

parameters:
params_h1.param (18.0 KB)

arducopter version:
4.0.5
I’ve also tried it on the latest vertion 4.0.7 and it behaved the same.

I wonder if the optical flow been in use in the control loop of the quad while it moving?!

Can it be that the optical flow is been used only in hovering?
If so, there is a way to send veloicity commands to move forward and to avoid from drifting to the sides (roll)?