Standard atmosphere functions based on the 1976 Standard Atmosphere. Returns density, speed of sound, temperature, pressure, and viscosity for a given altitude input up to 86 km.
Functions are designed to be useful for those designing and analyzing aircraft and have the following features:
•Inputs may be scalar, vector, matrix, or n-dimensional arrays. Functions are vectorized and fast for computing conditions at a large number of points simultaneously. Especially for n-dimensional problems, it is faster than the built-in atmosisa that comes with the aerospace toolbox.
•Temperature offset option for non-standard atmospheres, e.g analyzing hot day aircraft performance.
•Absolute temperature option for non-standard atmospheres, e.g for when OAT is known.
•Either SI or imperial units (and easy to set your preferred default).
•Units consistency can be enforced by using the Physical Units Toolbox, reducing errors and making code clearer.
•Returns everything needed to easily determine important parameters such as dynamic pressure, Mach number, Reynolds number, stagnation temperature, etc.
•Option for geometric instead of geopotential altitude input.
•Density altitude function allows reverse lookup of altitude based on gas properties.
•Stripped-down, troposphere-only function included for when computation speed is a priority.
References: ESDU 77022; www.pdas.com/atmos.html
Sky Sartorius (2021). Standard Atmosphere Functions (https://github.com/sky-s/standard-atmosphere), GitHub. Retrieved .
Inspired by: Standard Atmosphere Calculator, Complete 1976 Standard Atmosphere, ISA chart, Physical Units Toolbox, Density altitude calculator
Inspired: Density altitude calculator, Simple propulsion performance estimation, CORE: Conceptual Optimization of Rotorcraft Environment
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Write a computer program (using C++/MATLAB/Python) for creating a user defined
function that can calculate the Properties of atmosphere (Temperature, Pressure,
Density, Speed of Sound and Dynamic Viscosity) under the International Standard
Atmosphere (ISA) Conditions up to the altitude of 50 km.
it looks great but do you know how you could include it in MATLAB function block?
with a good help!!!!
good job!!!!!!!!!!
Right now STDATMO expects the temperature offset to be in degrees Kelvin/Celsius regardless of which length unit is used for altitude input. Keep in mind that dT is an offset, so when converting between Celsius and Fahrenheit, use only the scaling factor (offset C/F = K/R = 5/9).
It was originally thought that non-standard atmospheres would rarely be based on temperature offsets in degrees Fahrenheit, but I would greatly appreciate user feedback: Should the temperature offset for altitude input in meters be in degrees C/K and in degrees F/R for altitude input in feet?
very clean code with a good help. Haven't yet been able to check the correctness, but it seems OK. The code seems to be implemented way better than the "Complete 1976 Standard Atmosphere" implementation.
Great job