大气参数计算子程序

输入:高度(m)

输出:密度、当地音速,重力加速度(也可以输出气压、温度)

参考资料:USSA1976

function [row,av,g]=OnAir(YH)

H=6356.766*YH/(6356766+YH);
if H<0
    H=0;
elseif H<=11
        Tb=288.15;
        Lb=-6.5;
        Pb=101325.3;
        Hb=0;
    elseif H<=20
        Tb=216.65;
        Lb=0;
        Pb=22631.99;
        Hb=11.0;
    elseif H<=32
        Tb=216.65;
        Lb=1;
        Pb=5474.798;
        Hb=20.0;
    elseif H<=47
        Tb=228.65;
        Lb=2.8;
        Pb=868.0101;
        Hb=32;
    elseif H<=51
        Tb=270.65;
        Lb=0;
        Pb=110.9005;
        Hb=47;
    elseif H<=71
        Tb=270.65;
        Lb=-2.8;
        Pb=66.93803;
        Hb=51;
    elseif H<=84
            Tb=214.65;
            Lb=-2.0;
            Pb=4.220234;
            Hb=71;
        else
            row =0;
            av=340;
        end
T=Tb+Lb*(H-Hb);
if Lb==0
    P=Pb*exp(-34.1631947*(H-Hb)/Tb);
else
    P=Pb*(Tb/T)^(34.1631947/Lb);
end
row=P/T/287.05;
av=20.0468*sqrt(T);
 
R=6371004;
g=(6371004/(6371004+YH))^2*9.80665;

你可能感兴趣的:(matlab)