Because it thinks the rangefinder is telling it that it’s climbing into the air. disable your rangefinder and the problems should go away.
Shouldnt be aerodynamic issue affecting barometer. We have multiple drones build exactly same (FC is inside of the drone, covered from all directions from direct wind.).
But this problem occurs only on this one. But only on this drone we are using 4.1.0. version of AC, IRlock, Rangefinder, and using GPS as ALT source.
then you have a bad rangefinder or a bad connection to it.
Faulty values are caused by reflection from the IRlock beacon, we tested it, If the rangefinder is directly above irlock becaon then we get faulty values. It happend multiple times during Ascend and in that case the drone just stop for a sec and then continues climbing.
Its showing as faulty data, this is what is causing the altitude to deviate. look at radar altimeters or ultrasonic if you are getting interference.
https://ardupilot.org/copter/docs/common-aerotenna-usd1.html
When your ascending you will be past the rngfnd1_max_cm of 500cm so it wont effect the vehicle, only when you are under 5m would you see the effects.