ads.util

Functions

ads.util.Rodrigues

ads.util.Rodrigues(v, angle)

RODRIGUES Reurns the rotation matix assiated with the vector omega omega is a vector whos direction refines the axis of rotation and who magnitude defines the magnitude of rotation (in radians)

ads.util.atmos

ads.util.atmos(h, tOffset)

ATMOS Find gas properties in the 1976 Standard Atmosphere. [rho,a,T,P,nu,z,sigma] = ATMOS(h,opts)

ATMOS by itself gives atmospheric properties at sea level on a standard day.

ATMOS(h) returns the properties of the 1976 Standard Atmosphere at geopotential altitude h, where h is a scalar, vector, matrix, or ND array.

The input h can be followed by parameter/value pairs for further control of ATMOS. Possible parameters are:

tOffset - Returns properties when the temperature is tOffset degrees

above or below standand conditions. h and tOffset must be the same size or else one must be a scalar. Default is no offset. Note that this is an offset, so when converting between Celsius and Fahrenheit, use only the scaling factor (dC/dF = dK/dR = 5/9).

Description: SI:

Input: ————– —–

h | z Altitude or height m tOffset Temp. offset °C/°K

Output: ————– —–

rho Density kg/m^3 a Speed of sound m/s T Temperature °K P Pressure Pa nu Kinem. viscosity m^2/s z | h Height or altitude m sigma Density ratio -

ATMOS returns properties the same size as h and/or tOffset (P does not vary with temperature offset and is always the size of h).

Example 1: Find atmospheric properties at every 100 m of geometric height for an off-standard atmosphere with temperature offset varying +/- 25°C sinusoidally with a period of 4 km.

z = 0:100:86000; [rho,a,T,P,nu,h,sigma] = atmos(z,’tOffset’,25*sin(pi*z/2000),…

‘altType’,’geometric’);

semilogx(sigma,h/1000) title(‘Density variation with sinusoidal off-standard atmosphere’) xlabel(‘Density ratio, sigma’); ylabel(‘Geopotential altitude (km)’)

Example 2: Create tables of atmospheric properties up to 30,000 ft for a cold (-20°C), standard, and hot (+20°C) day with columns [h(ft) z(ft) rho(slug/ft³) sigma a(ft/s) T(R) P(psf) µ(slug/ft-s) nu(ft²/s)] leveraging n-dimensional array capability.

[~,h,dT] = meshgrid(0,-5000:1000:30000,[-20 0 20]); [rho,a,T,P,nu,z,sigma] = atmos(h,’tOffset’,dT*9/5,’units’,’US’); t = [h z rho sigma a T P nu.*rho nu]; format short e varNames = {‘h’ ‘z’ ‘rho’ ‘sigma’ ‘a’ ‘T’ ‘P’ ‘mu’ ‘nu’}; ColdTable = array2table(t(:,:,1),’VariableNames’,varNames) StandardTable = array2table(t(:,:,2),’VariableNames’,varNames) HotTable = array2table(t(:,:,3),’VariableNames’,varNames)

Example 3: Use the unit consistency enforced by the DimVar class to find the SI dynamic pressure, Mach number, Reynolds number, and stagnation temperature of an aircraft flying at flight level FL500 (50000 ft) with speed 500 knots and characteristic length of 80 inches.

V = 500*u.kts; c = 80*u.in; o = atmos(50*u.kft,’structOutput’,true); Dyn_Press = 1/2*o.rho*V^2; M = V/o.a; Re = V*c/o.nu; T0 = o.T*(1+(1.4-1)/2*M^2);

This model is not recommended for use at altitudes above 86 km geometric height (84852 m / 278386 ft geopotential) but will attempt to extrapolate above 86 km (with a lapse rate of 0°/km) and below 0.

See also ATMOSISA, ATMOSNONSTD, TROPOS, DENSITYALT ,

U - http://www.mathworks.com/matlabcentral/fileexchange/38977.

[rho,a,T,P,nu,z,sigma] = ATMOS(h,varargin) Copyright 2015 Sky Sartorius www.mathworks.com/matlabcentral/fileexchange/authors/101715

References: ESDU 77022; www.pdas.com/atmos.html

ads.util.atmosT

ads.util.atmosT(h, tOffset)

ATMOST Find temperature in the 1976 Standard Atmosphere (optimized). T = ATMOST(h, tOffset)

ATMOST returns only the temperature from the 1976 Standard Atmosphere at geopotential altitude h. This is a highly optimized version of ATMOS that only calculates temperature, making it much faster for temperature-only queries.

Inputs:

h - Altitude or height (m), scalar, vector, matrix, or ND array tOffset - Temperature offset (°C/°K), optional. Default is 0.

Must be same size as h or scalar.

Output:

T - Temperature (°K), same size as h

This function uses the same atmospheric model as ATMOS but skips all pressure, density, viscosity, and other calculations for maximum speed.

Example

h = [0, 5000, 11000, 20000]; T = ads.util.atmosT(h); % Standard atmosphere temperatures T_hot = ads.util.atmosT(h, 15); % +15°C offset

See also ATMOS

Copyright 2015 Sky Sartorius (original ATMOS) Optimized temperature-only version

ads.util.calibrated_airspeed

ads.util.calibrated_airspeed(Mach, P, P_s, a_s, gamma)

CAS get the calibrated airspeed for a given Mach and pressure INPUTS: - Mach: Mach number to calculate calibrated airspeed at - P: ambient pressure to calculate airspeed at - P_s: reference pressure (sea level) - gamma: specfic heat ratio

ads.util.equivelent_true_airspeed

ads.util.equivelent_true_airspeed(p, rho, p_0, rho_0, gamma, CAS)

EQUIVELENT_TRUE_AIRSPEED Summary of this function goes here Detailed explanation goes here

ads.util.get_flight_condition

ads.util.get_flight_condition(M, opts)

ads.util.get_version

ads.util.get_version()

ads.util.rotx

ads.util.rotx(angle)

ROTX Summary of this function goes here Detailed explanation goes here

ads.util.roty

ads.util.roty(angle)

ROTX Summary of this function goes here Detailed explanation goes here

ads.util.rotz

ads.util.rotz(angle)

ROTX Summary of this function goes here Detailed explanation goes here

ads.util.tern

ads.util.tern(expr, ifTrue, ifFalse)

TERN Summary of this function goes here Detailed explanation goes here

ads.util.true_airspeed

ads.util.true_airspeed(M, a, T, T_s)

CAS get the true airspeed for a given Mach and pressure INPUTS: - Mach: Mach number to calculate calibrated airspeed at - T: ambient tempeture to calculate airspeed at - T_s: reference temperature (sea level) - gamma: specfic heat ratio