I've heard that the way the plane measures its altitude is to use a barometer to measure air pressure.
Does the pressure at the static ports drop as the aircraft's speed increases?
There is no perfect way to get true static pressure, an answer in the above question has showed that the pressure measured is different along the fuselage. So static pressure error correction(SSEC) must be done to measure true altitude. I think its in a form of lookup table of (angle of attack, angle of slip, gyro angular velocity)=>(SSEC value).
But this lookup table is too hard to build, so I guess, for cost considerations, altimeters are only designed to work in normal flight. When the plane enters spin, the altimeter reading will jump rapidly randomly. Fighter pilots will also see altimeter jumping when they are in dog fights. Is that right?