When the Copter is flying automatically under a bridge

Hi all,

I have used copter for flight tests under the bridge,
But the copter flight attitude is not good,
Horizontal accuracy and height accuracy are affected,

maybe using optical flow face up ,
and EKF2 fusion optical flow data to make sure copter have better attitude?
Does anyone have a good method?