When Drone With SF11 Fly Away the Building

I use SF11 for altitude hold , There is a problem that when the drone fly away the building , the measure height of rangefinder suddenly go high . and when the drone fly in the building , the height go down . That cause the acture height of the drone suddenly change . Just as the pic show .


And the log show that Here my question is why the first three the height of the drone did not change , and then suddenly change, is there any method to avoid the suddenly change height ?

may be try to adjust the madian filter with lighware terminal