The U.S. Standard Atmosphere, 1976 (USSA1976) consists of two parts, the lower atmosphere below 86 km altitude and the upper atmosphere from 86 km to 1000 km altitude. The lower atmosphere is further separated into seven regions expressed in geopotential height H (m'). The upper atmosphere is further separated into five regions in geometric height Z (m).
The lower atmosphere is explicitly stated with relatively simple equations for molecular temperature TM (K) and pressure P (Pa). The upper atmosphere is much more complicated, requiring numerical integration to determine the number densities ni (m-3) of the major gas constituents (N2, O, O2, Ar, He, and H).
A complete implementation of USSA1976 is presented below. The number densities are numerically integrated using Simpson's rule with a 10 m integration step (this is broken up into two 5 m regions). The parameter tau within the number density integral is numerically integrated using the Trapezoidal Rule with a 5 m integration step. Various step sizes and integration methods were tried in order to achieve values as close to that listed in USSA1976. Number density accuracy is within 0.05%. Double precision arithmetic is used throughout.