% *********** 1976 STANDARD ATMOSPHERE SUBROUTINE ********** % % Mason's BASIC program, converted to FORTRAN - Sept. 1, 1989 % converted to MATLAB, by Paul Buller, 1998 % converted to a MATLAB function by w.h. mason, 2001 % % % W.H. Mason % Department of Aerospace and Ocean Engineering % Virginia Tech, Blacksburg, VA 24061 % email: mason@aoe.vt.edu % % k - = 0 - metric units % <> 0 - English units % % KK - 0 - good return % 1 - error: altitude out of table, % do not use output (max altitude for this % routine is 84.85 km or 282,152 ft.) % % Z - input altitude, in feet or meters (depending on k) % % output: % units: metric English % T - temp. deg K deg R % P - pressure N/m^2 lb/ft^2 % R - density (rho) Kg/m^3 slug/ft^3 % A - speed of sound m/sec ft/sec % MU - viscosity Kg/(m sec) slug/