MATLAB
```SoundSpeed = SpeedOfSound(T)
[vsPlat vsTarg] = SpeedOfSound(G,[Atm])
SoundSpeed = SpeedOfSound(Atm)```

Returns the speed of sound as a function of temperature. It is also possible to input a G structure or an Atm structure to evaluate the speed of sound at various altitudes. The temperature at these altitudes is assumed to be modeled by US_Standard76, unless otherwise specified by Atm.TempEval.

 Parameters Description T [vector] Temperature (K) G [struct] A geometry structure as from GeomStruct to compute the speed of sound at the platform and target altitudes. If Atm is also passed in, then the speed of sound is evaluated using the temperature model in the input Atm. Otherwise, the temperature model will be from US_Standard76. Atm [struct] An atmosphere structure as from AtmStruct. If input with a G structure, the temperature model in Atm will be used to compute the speed of sound at the platform and target altitudes. If only an Atm structure is input, speed of sound will be computed at the phase screen altitudes. If no temperature model is present, US_Standard76 will be used.
 Return Values Description SoundSpeed [vector] Speed of sound (m/s). If an Atm struct is entered without a G, then this will be evaluated at the points along Atm.h. vsPlat [vector] Speed of sound at the platform location (if a G structure is input as the first argument). vsTarg [vector] (Optional) Speed of sound at the target location (if a G structure is input as the first argument).

• "U.S. Standard Atmosphere, 1976," ADA-035728, National Oceanic and Atmospheric Administration, Washington, D.C., 1976. Equation 50 on page 18.

>> v = SpeedOfSound(300);

• Return speed of sound at specified temperature
>> [vP vT] = SpeedOfSound(GeomStruct);

• Return speed of sound at platform and target altitudes assuming US_Standard76 for temperature model
>> v = SpeedOfSound(AtmStruct)

• Compute speed of sound as a function of the temperature at the phase screen altitudes

 Copyright (c) 2009. All rights reserved. What do you think about this topic? Send feedback!