Javascript implementation of the barometric function for determining air density and pressure as a function of altitude