To expand on verst's answer, the altimeter setting is defined based on your location, to roughly match meteorological conditions. When flying IFR or otherwise directed by ATC, you will be given altimeter settings. They will also be repeated during arrival and landing. In addition, they are given using an automated weather service called ATIS. ATIS broadcasts are given an incremental letter, that way you can verify you have the latest update. When checking in with a controller you will give the letter, and they will tell you if you're outdated.
The most important thing is that everyone in an area reference the same altitude/altimeter setting for traffic avoidance. Whether or not that is off from the actual altitude by a few hundred feet or not is secondary, since ground avoidance typically uses a lot bigger safety margins. Airliners and military planes have radar altimeters to measure height above ground when flying in IMC (low vis), while smaller planes typically fly VFR (based on visual rather than instruments).
> Airliners and military planes have radar altimeters to measure height above ground when flying in IMC (low vis),
But the RA are used primarily in the later phases of the approach. The barometric altimeter setting remains vitally important throughout most IFR ops in all categories of aircraft. (Radar altimeters are a key component of the ground proximity warning system GPWS in transport aircraft.)
> while smaller planes typically fly VFR (based on visual rather than instruments).
General aviation aircraft are quite frequently well-equipped with instrumentation for IFR ops. I’ve flown approaches down to published minima in single engine aircraft and have (legally) departed in low IMC conditions that grounded Part 121 flights. (Not necessarily best judgement…but here to tell the tale that I’ve become wiser in older age…)
> But the RA are used primarily in the later phases of the approach.
Indeed, the context of my sentence was using it for ground avoidance.
> General aviation aircraft are quite frequently well-equipped with instrumentation for IFR ops.
Yes, but most GA flights are VFR flights. Again, the context was ground avoidance and my point was that since they are usually used for VFR, more advanced means of ground avoidance are not generally required.
The most important thing is that everyone in an area reference the same altitude/altimeter setting for traffic avoidance. Whether or not that is off from the actual altitude by a few hundred feet or not is secondary, since ground avoidance typically uses a lot bigger safety margins. Airliners and military planes have radar altimeters to measure height above ground when flying in IMC (low vis), while smaller planes typically fly VFR (based on visual rather than instruments).