# Speed of sound

Whether the speed of sound at the rifle comes from temperature alone or also from humidity.

## Generated table

**Setting:** Speed of sound

| Choice | Used by |
|---|---|
| Dry air (Standard) | Standard, Classic |
| Humid air | Physics, Spin |

## What it does

The speed of sound at the rifle sets the bullet's Mach number: its speed divided by the speed of sound. The drag the solver applies depends on that Mach number. This setting chooses how the speed of sound at the rifle is worked out.

- **Dry air (Standard):** from the air temperature alone. Humidity, pressure and altitude do not enter.
- **Humid air:** the dry value, raised a little for the water vapour in the air. Humid air is lighter than dry air at the same temperature, and sound travels faster in it. At 0 % humidity the two values are identical.

This setting fixes only the value at the rifle. How the value changes along the flight, as the bullet rises or the line of sight climbs or drops, belongs to [lapse](lapse.md) (and, on slopes, to [tempClamp](tempClamp.md)).

## When to choose it

Leave it on the model's own choice unless you are comparing models. The two values differ by about 0.16 % at 59 °F and 50 % humidity and by about 1.25 % at 100 °F and 100 % humidity. In dry air they are identical. The choice matters most in hot, humid air, and for flights that spend a long stretch near the speed of sound.

## How to picture it

Draw the drag curve: the bullet's drag coefficient on the vertical axis, Mach number on the horizontal. It is fairly flat well above the speed of sound, climbs steeply through the speed of sound, and eases off below it.

Now draw the bullet's speed along the flight as a point sliding down the horizontal axis as the bullet slows. The Mach number of each point is its speed divided by the speed of sound. A slightly higher speed of sound divides every speed by a slightly larger number, so every point on the flight slides a little to the left on the drag curve, by the same small fraction (the same percentage of its Mach number) at every distance. The bullet itself flies the same speed; only where it sits on the curve moves.

The effect on elevation comes from the long supersonic stretch of the flight, and the effect on the speed at the target comes from the short transonic stretch, and the two have opposite signs. Over the supersonic stretch, from the muzzle down to a little above the speed of sound, the curve slopes down to the right: a lower Mach sits higher on it, so the drag coefficient is a little higher, the bullet slows a little more, and more elevation is needed. This stretch is long, so it sets the sign and most of the size of the elevation change. Below the curve's peak, which lies a little above the speed of sound, the curve slopes the other way and falls steeply as the Mach number falls: the same slide to the left now lowers the drag coefficient, and the transonic stretch pushes elevation back down a little and leaves the bullet faster at the target. The two stretches do not cancel on elevation, because the long one wins, but the faster arrival is the transonic stretch's work. A shot that stays supersonic all the way still shifts slightly, but all of its flight is on the first slope, so its speed at the target changes the other way: lower, not higher. On a diagram, shade the supersonic slope and the steep fall below the peak in two colours and mark where the flight's points fall, once for each value: the two sets of points are a hair apart, and each shading shows its own sign.

## The math

Mach number and its use:

$$M = \frac{s}{c}$$

The solver's drag deceleration is proportional to $\rho\,C_d(M)\,s$ times the velocity, so a change in $c$ changes $C_d$ through $M$. Everything below is about $c_0$, the speed of sound at the rifle, which is the starting value the air model uses (see The algorithm).

| Symbol | Meaning | Unit |
|---|---|---|
| $s$ | the bullet's speed (ground speed, or air-relative when the wind-drag setting says so) | m/s |
| $M$ | Mach number | none |
| $C_d$ | drag coefficient from the drag table at Mach $M$ | none |
| $T_F$ | air temperature at the rifle | °F |
| $T_C$ | the same, in Celsius: $(T_F - 32)/1.8$ | °C |
| $T$ | the same, in kelvin: $T_C + 273.15$ | K |
| $P$ | station pressure: the entered inHg value times 3386.389 | Pa |
| $\phi$ | relative humidity: the entered percentage divided by 100 | none |
| $e_s$ | saturation vapour pressure of water at $T_C$ (from [vapour](vapour.md)) | Pa |
| $p_v$ | partial pressure of water vapour, $\phi\,e_s$ | Pa |
| $\varepsilon$ | ratio of the molar masses of water and dry air, 0.622 | none |
| $T_v$ | virtual temperature | K |
| $c_{\text{dry}}$ | the dry speed of sound at the rifle | m/s |
| $c_{\text{moist}}$ | the humid speed of sound at the rifle | m/s |
| $c_0$ | the value the setting hands to the air model | m/s |

Constants: 49.0223 is in feet per second per square root of degree Rankine; 459.67 converts °F to °R; 0.3048 converts feet to metres.

**`'dry'`.**

$$c_{\text{dry}} = 49.0223\,\sqrt{T_F + 459.67}\;\times 0.3048$$

Temperature is the only input. At 59 °F this is 340.3 m/s.

**`'moist'`.** Water vapour is lighter than dry air, so humid air at temperature $T$ behaves like drier air at a higher temperature, the virtual temperature:

$$e_s = 611.21\,\exp\!\left[\left(18.678 - \frac{T_C}{234.5}\right)\frac{T_C}{257.14 + T_C}\right] \qquad p_v = \phi\,e_s$$

$$T_v = \frac{T}{1 - \dfrac{p_v}{P}\,(1 - \varepsilon)} \qquad c_{\text{moist}} = c_{\text{dry}}\sqrt{\frac{T_v}{T}}$$

The dry value is scaled, not recomputed, so $\phi = 0$ gives $p_v = 0$, $T_v = T$ and exactly $c_{\text{dry}}$. The scale factor is about $1 + 0.189\,p_v/P$ for small $p_v/P$, so humidity matters in proportion to how much of the pressure is water vapour: more in hot air (large $e_s$) and in thin air (small $P$). The formula keeps the ratio of specific heats of dry air for the whole mixture, which slightly overstates humidity's effect. When the [vapour](vapour.md) setting is `'classic'`, $e_s$ is multiplied by its factor before $p_v$ is formed; the speed of sound then follows.

**Handing it on.** $c_0 = c_{\text{dry}}$ for `'dry'` and $c_0 = c_{\text{moist}}$ for `'moist'`. The air model returns $c = c_0$ at every height under the `lapse` values `'baseline'` and `'classic'`, and $c_0$ times the square root of a temperature ratio under `'path'`, `'classic-table'` and `'spinref'`; under `tempClamp` `'classic'` the slope taper starts from $c_0$ the same way. Those ratios are on the [lapse](lapse.md) and [tempClamp](tempClamp.md) pages.

## The algorithm

Where it runs: once per solve, `air` computes both $c_{\text{dry}}$ and $c_{\text{moist}}$ from the entered air. Then every time the flight needs the air at a point, which is at every integration step and again at every sampled range, `airAt` picks one of the two as $c_0$ and applies the height rule of `lapse`. The Mach number of that step or sample is the speed over the returned $c$. In the Spin model the muzzle Mach, which anchors the estimated aerodynamic coefficients, is the muzzle velocity over the same $c$ at height 0.

```
function air(env, vapour):
    Tc = (T_F - 32) / 1.8;  T = Tc + 273.15;  P = inHg * 3386.389
    es = 611.21 * exp((18.678 - Tc/234.5) * (Tc / (257.14 + Tc)))
    if vapour is 'classic': es = es * (vapour factor at T_F)
    pv = (RH / 100) * es
    c_dry   = 49.0223 * sqrt(T_F + 459.67) * 0.3048
    Tv      = T / (1 - (pv / P) * (1 - 0.622))
    c_moist = c_dry * sqrt(Tv / T)          # RH 0 gives c_dry exactly
    return both
```

```
function airAt(a, h, lapse, sound, tempClamp):
    if sound is 'moist': c0 = a.c_moist
    else:                c0 = a.c_dry
    if tempClamp is 'classic' and lapse in ('classic', 'classic-table', 'spinref'):
        return the taper's air, starting from c0       # tempClamp page
    if lapse is 'baseline':   return rho(h), c0                  # c held at the rifle's value
    if lapse is 'classic', 'classic-table' or 'spinref':
        if lapse is 'classic':  return rho(h), c0               # c held
        otherwise:              return rho(h), c0 * sqrt(temperature ratio at h)
    otherwise ('path'):         return rho(h), c0 * sqrt(f(h))   # f: lapse page
```

The option reaches the flight as `FlightInput.soundSpeed` and is read once, before the integration starts; the default is `'dry'`.

## On a real shot

**Changing only this setting on the Standard model**

The shot: a 350 gr 0.375 in bullet at 3048 fps muzzle velocity, fired at 3520 yd in air of 60 °F, 40 % humidity, 24.43 inHg at the firing line, latitude 42.1°, wind 10 mph from the right (90° to the line of fire), the same wind in every column; site altitude 5,500 ft. In the app, type it as "Site altitude" (shown when the profile's model reads one); left blank, the classic values count from sea level and can differ from this table. All other settings are the Standard model's. In the first column (North, level) the reference arc reaches 223 ft above the line of sight at 2160 yd.

| Value | Shown in the app as | North, level | East, level | North, 10° uphill | North, 10° downhill |
|---|---|---|---|---|---|
| `'dry'` | Dry air (Standard) | reference | reference | reference | reference |
| `'moist'` | Humid air | +0.028 / 0.000 / +0.8 | +0.028 / 0.000 / +0.8 | +0.029 / 0.000 / +0.7 | +0.026 / 0.000 / +0.8 |

Each cell is the change from the reference row (`'dry'`) in the same shot, as elevation (mil) / windage (mil) / velocity at the target (fps). Elevation: plus means more elevation must be dialed. Windage: plus means the windage correction moves to the right (dial further right); this is a correction, not where the bullet lands. Velocity: plus means the bullet arrives faster. A zero means no difference at the shown precision.

**Each value under the Spin model's other settings**

The shot: a 350 gr 0.375 in bullet at 3048 fps muzzle velocity, fired at 3520 yd in air of 60 °F, 40 % humidity, 24.43 inHg at the firing line, latitude 42.1°, wind 10 mph from the right (90° to the line of fire), the same wind in every column; site altitude 5,500 ft. In the app, type it as "Site altitude" (shown when the profile's model reads one); left blank, the classic values count from sea level and can differ from this table. All other settings are the Spin model's. In the first column (North, level) the reference arc reaches 221 ft above the line of sight at 2150 yd. Compared with the first column, the bullet differs in "North, level, monolithic tipped bullet".

| Value | Shown in the app as | North, level | North, level, monolithic tipped bullet |
|---|---|---|---|
| `'dry'` | Dry air (Standard) | -0.028 / 0.000 / -0.8 | -0.028 / 0.000 / -0.8 |
| `'moist'` | Humid air | reference | reference |

Each cell is the change from the reference row (`'moist'`) in the same shot, as elevation (mil) / windage (mil) / velocity at the target (fps). Elevation: plus means more elevation must be dialed. Windage: plus means the windage correction moves to the right (dial further right); this is a correction, not where the bullet lands. Velocity: plus means the bullet arrives faster. A zero means no difference at the shown precision.

Read from the first table: `'moist'` asks for +0.028 mil more elevation than `'dry'` on the level north shot, +0.029 on the uphill one and +0.026 on the downhill one, with windage unchanged at 0.000, and the bullet arrives +0.8 fps faster (+0.7 uphill). The air is 60 °F and 40 % humidity, so the humid speed of sound is only a fraction of a percent above the dry one, and the answer moves by a few hundredths of a mil. The two signs come from the picture of the drag curve: a higher speed of sound lowers every Mach number. While the bullet is well above the speed of sound, a lower Mach sits where the drag coefficient is a little higher, so the bullet slows slightly more and needs a little more elevation; once it is through the speed of sound and slowing toward the end of the flight (this shot crosses it near 2,500 yd), a lower Mach sits where drag is a little lower and the speed at the target comes out higher. The second table shows the same pair on the Spin model, where `'moist'` is the model's own choice and `'dry'` reads -0.028 mil and -0.8 fps against it, the same size with the sign reversed, equal to the printed digits (not exactly, since the Spin model's other settings differ from the Standard model's).

---

[All reference pages](../index.md)
