API Documentation

Atmospheris provides the ISO 2533 Standard Atmosphere model and ISO 5878 wind distribution calculations as both a Ruby gem and a TypeScript/JavaScript library. Both implement the complete set of atmospheric property calculations from the standard, covering all 19 derived properties across the full altitude range of −2,000 m to 80,000 m, plus Rice distribution wind modeling per ISO 5878.

Choose Your Language

Property Groups

ISO 2533 organizes atmospheric properties into three groups, which both libraries return in a single result object:

Group 1 — Primary

  • Geopotential & geometric altitude
  • Temperature (K, °C, °F, °R) & temperature ratio
  • Molecular temperature & lapse rate
  • Pressure (Pa, mbar, mmHg) & pressure ratio
  • Density & density ratio

Group 2 — Derived (Motion)

  • Gravity & gravity ratio
  • Speed of sound & speed ratio
  • Dynamic viscosity (Sutherland’s formula)
  • Kinematic viscosity
  • Mean particle speed

Group 3 — Derived (Other)

  • Specific weight
  • Pressure scale height
  • Thermal conductivity
  • Air number density
  • Collision frequency
  • Mean free path & mole volume

Precision Modes

Both libraries support two precision levels, matching the presentation conventions in ISO 2533:

  • Normal precision — Full significant figures for engineering calculations. Matches ISO 2533 Tables 5–7.
  • Reduced precision — Fewer significant digits, matching the reduced-precision tables in ISO 2533 Tables 8–10.

Both modes use the same underlying formulas; only the output rounding differs. The precision setting does not affect calculation accuracy — only the number of digits presented in the result.

Resources