function y_atm = GetAtmosphere(Alt)

Lapse=0.0065;     %K/m       - temperature lapse rate
hPause=11000;     %m         - bound altitude of tropopause 
T0=288.15;        %K         - air temperature at sea level
T0Pause=T0-71.5;  %K         - air temperature in tropopause 
p0=101325;        %Pa        - air pressure at sea level
p0Pause=22632;    %Pa        - pressure in tropopause
M=0.0289644;      %kg/mol    - molar mass of dry air
R=8.31447;        %J/(mol.K) - universal gas constant
g0=9.80665;       %m/s       - acceleration of gravity 

if Alt<11000
      g=g0*(6371020/(6371020+Alt))^2;
      T=T0-Lapse*Alt; 
      p=p0*(1-(Lapse*Alt)/T0)^(g*M/(R*Lapse));
      Ro=p*M/(R*T);
      mi=(1.458*10^(-6)*T^1.5)/(T+110.4);
else
      g=g0*(6371020/(6371020+Alt))^2;
      T=T0Pause;
      p=p0Pause*exp(-g*(Alt-hPause)/(R/M*T0Pause));
      Ro=p/(T*R/M);
      mi=(1.458*10^(-6)*T^1.5)/(T+110.4);
end
y_atm=[Ro; p; T; mi; g];