
Standard Atmosphere Calculator
by admin in Curve Fitting , Math, Statistics, and Optimization , MATLAB Family , Optimization , Statistics and Machine Learning on April 3, 2019This function to determine temperature, pressure, density, and speed of sound as a function of height. Function based on US Standard Atmosphere of 1976. All calculations performed in metric units, but converted to english if the user chooses. Assuming constant gravitational acceleration.
The Function has the form:
function [t, p, rho, a] = atmosphere(height, unit)
Input:
- height (feet or meters) – can be a 1-dimensional vector
- unit – optional; default is metric;
– boolean, True for english units, False for metric
Output:
- t – Temperature (K (default) or R)
- p – Pressure (pa (default) or psi)
- rho – Density (kg/m^3 (default) or lbm/ft^3)
- a – speed of sound (m/s (default) or ft/s)
Share Now!