Altitude hold baro vs range finder setting up optical flow mode

Hi Hi have a issues during setting up the indoor position hold .
when using barometer the alt hold is jump up and down crazy at take off ( it was not like that before setup the optical flow test )
After setting to ek3_src1_posz = 2 ( which using range finder ) the alt hold working fine .

also do ek3_src1_posz = 2 is prioritize range finder then if range finder out of range it use baro or gps for second source ?

here are the flight log

Please Use ArduCopter 4.3.6 instead of ArduCopter 4.0.x.

Confirmed it is 4.3.6.

update switched the IR+optical flow module help

I updated the post header to reflect that