system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 How did planes in the 1940’s know their altitude?

They didn’t have a sonar or something that would have helped them determine their altitude, right?
gpt
The easiest way to measure altitude is by measuring the air pressure. The higher you go the lower the pressure. It is a bit more complex then that. Moving air creates different presures over the hull then stationary air so you need a good place to measure the pressure at or compensate for it. Weather also affects the pressure so you need to calibrate for this, especially during landing. But in general a good barometer is the best way to measure altitude and is still used on airplanes today.