This project has:
- AtmosphericModel class to arbitrary reference atmospheric models, and
- Unit class to represent arbitrary user-defined units
Using them, I created an object Ira to represent the Indian Reference Atmosphere (modelled using the variation of atmospheric temperature with altitude over India, as reported in M. N. Sasi (1994), "A reference atmosphere for the Indian equatorial zone", Indian Journal of Radio and Space Physics, vol. 23, pp. 299 - 312).
You can just load the object to memory, keep these classses on the MATLAB path, and operate on them.
Some of the things that you could try out are:
Find atmospheric conditions at a given geometric altitude array, with input and output units
T = Ira.pressure(45, 'mi', 'bar');
a = Ira.lapseRate([24, 9, 68; 32, 17, 41]);
Almost all functions accept array input of any dimensions, particularly for altitude.
However, keep in mind that the geometric altitude should be between 0 and 80 km AMSL for obtaining the atmospheric conditions accurately, because those are the extents of Sasi's Indian Reference Atmosphere.
Change DisplayUnits property of Ira and use with the unit system you are comfortable in
Ira.DisplayUnits.altitude = 'nm';
Ira.DisplayUnits.density = 'lb/oz';
rho = Ira.density(9)
Find relative or absolute temperature at any altitude array
T_K = Ira.temperature(0, , 'K');
T_0C = Ira.temperature(35000, 'ft', '0F', true);
Find geopotential altitudes corresponding to geometric and vice-versa
hGm_ft = Ira.geometricAltitude(69000, 'm', 'ft')
hGp_yd = Ira.geopotentialAltitude(28, , 'yd')
Use International Standard Atmosphere instead
Isa = AtmosphericModel;
IsaHot = AtmosphericModel(25);
More details about the code itself can be found on the Github page.