How is altitude reached by aircraft flying above the stratosphere measured?

Aircraft flying above the stratosphere (above 30km) are rare, but there is still the X-15 and the spaceship two. For those aircraft, maximal altitude is measured to within 500 ft.

As described in this question, barometric altimeters are not accurate nor practical that high. Yet, those aircraft are aircraft and as such I expect them to be fitted with barometric altimeters.

How is altitude measured with such precision (X-15: 354,200 ft in 1963, 15 years before GPS)?

• Presumable the X-15 was being tracked by radar, which (if properly arranged) is capable of measuring altitude with considerable accuracy. Sep 2, 2020 at 4:02
• Bear in mind that although we call these instruments "altimeters", they are really barometers. They really measure pressure, not altitude. They display altitude. But think about it. The only time we really care what the actual absolute altitude is is when we're close to the ground, like on an instrument approach or navigating in IMC over terrain. The only thing we care about at 40,000 feet is relative altitude, that is our altitude relative to the other nearby aircraft. That's why we don't set local QNH over FL180. yesterday

They used inertial altitude on the X-15 for high altitude measurements. This works just like an IRS (Inertial Reference System), which was used on airliners of that era: you can get the position (latitude and longitude) based on a manually entered (or GPS derived) start position by integrating rotations and accelerations over time. The principle also works in 3D, if you also enter the start altitude. Note however that inertial altitude (true altitude above mean sea level) is not equal to barometric altitude, which can deviate based on local environmental conditions.

On the instrument panel was an attitude indicator whose source was inertially derived. Also provided were inertial velocity, altitude, and rate-of-climb. Barometric instruments included an altimeter and a combined Mach-airspeed indicator; these instruments were usable only below about 75,000 feet and were used mainly in the traffic pattern. An angle of attack and a sideslip indicator were provided; the source of these two instruments was selectable, inertial for high altitude flight and barometric for the end of the mission.

(NASA - Dryden History - X-15 Lessons Learned, emphasis mine)

You can see both instruments in the following image:

(modified from source)

Theodolites operated by ground observers. Radar. Inertial instruments.

• From How to Answer: "Brevity is acceptable, but fuller explanations are better" Sep 2, 2020 at 17:00