Altitude
What it's for
Barometric pressure at altitude, and the Cross correction for using sea-level tables at altitude. Combine it with the depth functions by passing the altitude's surface pressure.
Formulas
The ICAO barometric formula:
The Cross correction (theoretical ocean depth):
: barometric pressure at altitude , bar. : altitude above sea level, m. bar: sea-level standard pressure. : actual depth at altitude, m. : the sea-level depth with the same pressure ratio, m. K is the sea-level temperature, K/m the lapse rate and the exponent .
Using it with depth math
surfaceAtaAtAltitude returns the surface pressure relative to sea level (1.0 at 0 m). Pass it as surfacePressure to any depth function:
ts
import { surfaceAtaAtAltitude } from 'dive-math/altitude'
import { mod, gas } from 'dive-math/gas'
mod(gas(0.32), 1.4, { surfacePressure: surfaceAtaAtAltitude(1500) })Assumptions and limits
- ICAO standard atmosphere, troposphere only. Altitude must be in the range −500 m up to (not including) 11 000 m, otherwise a
RangeErroris thrown. - A standard atmosphere is assumed. Real weather shifts the surface pressure by a few percent.
- This is pressure math only. It says nothing about decompression at altitude.
Sources
- ICAO Doc 7488/3:
K, lapse rate 0.0065 K/m, exponent 5.25588. - Sea-level pressure: ISO 2533 / ICAO (101 325 Pa).
Examples
ts
import { surfacePressureAtAltitude, surfaceAtaAtAltitude, theoreticalOceanDepth } from 'dive-math/altitude'
import { ataAtDepth } from 'dive-math/pressure'
surfacePressureAtAltitude(1000) // => 0.899
ataAtDepth(10, { surfacePressure: surfaceAtaAtAltitude(1000) }) // => 1.887
theoreticalOceanDepth(30, 1000) // => 33.82API
See the altitude API reference.