%
% Calculate pressure for a given temperature and density
%           based on the Ideal Gas Law
%
function pressure = airprs (temperature, density)
% Input:
%        temperature [K]
%        density [kg/m^3]
% Output:
%        pressure [Pa]
%
global rgas;      % gas constant [J/kg/K] = 287.04 for dry air 

pressure = density * rgas * temperature;    % J = N*m = Pa*m^3

end
