Skip to content

Isa

isa

ICAO standard atmosphere: pressure altitude <-> static pressure.

ADS-B/Mode S barometric altitude is a pressure altitude (standard setting, 1013.25 hPa), so converting it with the ISA is exact by definition — no QNH, no surface pressure and no temperature assumption is involved (ICAO Doc 7488).

altitude_from_pressure(p_pa)

Pressure altitude (m) for a static pressure in Pa (inverse of the above).

Source code in packages/barograph-met/src/baro/met/isa.py
def altitude_from_pressure(p_pa: ArrayLike) -> NDArray[np.float64]:
    """Pressure altitude (m) for a static pressure in Pa (inverse of the above)."""
    p = np.asarray(p_pa, dtype=np.float64)
    h = np.full_like(p, np.nan)
    for i, (h0, t0, lapse, p0) in enumerate(_BASES):
        p_top = _BASES[i + 1][3] if i + 1 < len(_BASES) else 0.0
        m = (p <= p0) & (p > p_top) if i > 0 else (p > p_top)
        if lapse == 0.0:
            h[m] = h0 - _R * t0 / _G0 * np.log(p[m] / p0)
        else:
            h[m] = h0 + t0 / lapse * ((p[m] / p0) ** (-lapse * _R / _G0) - 1.0)
    return h

pressure_from_altitude(h_m)

Static pressure (Pa) for a pressure altitude in metres (valid up to 32 km).

Source code in packages/barograph-met/src/baro/met/isa.py
def pressure_from_altitude(h_m: ArrayLike) -> NDArray[np.float64]:
    """Static pressure (Pa) for a pressure altitude in metres (valid up to 32 km)."""
    h = np.asarray(h_m, dtype=np.float64)
    p = np.full_like(h, np.nan)
    for i, (h0, t0, lapse, p0) in enumerate(_BASES):
        upper = _LAYERS[i][2]
        lower = -np.inf if i == 0 else h0
        m = (h >= lower) & (h < upper) if i < len(_BASES) - 1 else (h >= lower) & (h <= upper)
        dh = h[m] - h0
        if lapse == 0.0:
            p[m] = p0 * np.exp(-_G0 * dh / (_R * t0))
        else:
            p[m] = p0 * ((t0 + lapse * dh) / t0) ** (-_G0 / (lapse * _R))
    return p

pressure_from_altitude_ft(h_ft)

Static pressure (Pa) for a pressure altitude in feet.

Source code in packages/barograph-met/src/baro/met/isa.py
def pressure_from_altitude_ft(h_ft: ArrayLike) -> NDArray[np.float64]:
    """Static pressure (Pa) for a pressure altitude in feet."""
    return pressure_from_altitude(np.asarray(h_ft, dtype=np.float64) * FT)