# Temperature on slopes

On cold or hot days, how the air cools or warms along a slope for the three Classic air choices, easing back toward a normal day on one side.

## Generated table

**Setting:** Temperature on slopes

| Choice | Used by |
|---|---|
| Off (Standard) | Standard, Physics, Spin |
| Classic (cold or hot days ease toward normal) | Classic |

## What it does

Air along a slope changes with height: it cools as the bullet climbs and warms as it drops, and the density, the pressure and the speed of sound all follow that temperature. This setting only matters when "Air along the path" is one of the three Classic choices; the other two ignore it.

- **Off (Standard):** each Classic choice keeps its own air, as described on the `lapse` page: the density law of the standard atmosphere, with a floor at 650 ft below sea level (800 ft for the cooler-air variant), and a speed of sound that either stays put or follows height depending on the choice.
- **Classic (cold or hot days ease toward normal):** the three Classic choices take their air from one shared rule. On a day colder than normal for your pressure, the air does not keep cooling as the bullet climbs: the difference from a normal day shrinks to nothing over about 17,500 ft of climb. On a hotter-than-normal day the same happens as the bullet drops. Going the other way (colder day, dropping; hotter day, climbing) the air changes at the plain standard rate. The air stops changing 800 ft below sea level. With this on, the three Classic choices differ only in the height they read, and the speed of sound always follows the temperature.

## When to choose it

Leave it on the model's own choice. The Classic model switches it on; every other model leaves it off. It is worth turning on when you compare against the Classic model on a steep shot on a day well away from normal. At standard temperature and pressure it changes little; on a very cold or hot day on a steep shot, to long range, it can change the elevation by a few tenths of a mil (see the cold-air table under On a real shot).

## How to picture it

Draw two temperature profiles against height on the same chart, height up the side.

- **The standard day** is a straight line sloping down at the standard rate, 6.5 K per kilometre, passing through the temperature a normal day has at your pressure altitude.
- **Your day** starts at the rifle at your real temperature, say colder than the standard line.

Without the taper, your day is a copy of the standard line shifted sideways to start at your temperature, and stays that distance from it at every height. With the taper, on the side where the bullet moves toward the height where the standard line would be as cold as you are, your line is drawn with a gentler slope than the standard one, so it leans toward the standard line. How much gentler depends only on how far your day is from the standard one at the rifle, not on height. For a deviation smaller than 34.671 K the two lines meet 17,500 ft from the rifle; beyond that height your line keeps its gentler slope, crosses the standard line and then moves away from it on the other side. For a deviation of 34.671 K or more the gentler slope is no slope at all: your line stays at the same temperature at every height on that side and never meets the standard line. On the other side (a colder day, dropping), your line is just the standard slope from your temperature. Underneath, shade a vertical band at 800 ft below sea level: the line stops there and the air is the same everywhere below it.

Level shots along the line of sight never leave the rifle's height, so they never see the taper. Only a choice that reads the bullet's real height (the arc rises on a long level shot) can move on a level shot.

## The math

The taper replaces the air of `'classic'`, `'classic-table'` and `'spinref'` (the three Classic values of `lapse`), and only when `tempClamp` is `'classic'`. Each keeps the height $h$ it would use (the line of sight's, or for `'spinref'` the bullet's real height; see the [lapse](lapse.md) page) and takes the density $\rho$ and speed of sound $c$ from the equations here. `'baseline'` and `'path'` ignore this setting.

| Symbol | Meaning | Unit |
|---|---|---|
| $h$ | height above the sight at which the air is read | m |
| $A$ | site altitude above sea level; 0 when none is given | m |
| $\rho_0$ | drag density of the air at the rifle | kg/m³ |
| $T_0$ | air temperature at the rifle | K |
| $T$ | air temperature at height $d$, $T_0\,\tau$ | K |
| $c_0$ | speed of sound at the rifle (dry or humid, as chosen) | m/s |
| $R$ | gas constant of dry air, 287.05 | J/(kg K) |
| $P_0$ | the dry-air pressure of that density at the rifle | Pa |
| $P_s$ | standard sea-level pressure, 101325 | Pa |
| $T_s$ | standard sea-level temperature, 288.15 | K |
| $L$ | standard lapse rate, 0.0065 | K/m |
| $H_p$ | pressure altitude of the rifle | m |
| $\Delta T$ | how much warmer the rifle's air is than standard air at its pressure altitude (negative when colder) | K |
| $H_t$ | taper height, 17,500 ft = 5334 | m |
| $z_t$ | the floor, −800 ft = −243.84 | m |
| $d$ | the height $h$ after the floor is applied | m |
| $f$ | fraction of the standard lapse rate kept, 0 to 1 | none |
| $s$ | temperature gradient used, $-fL$ | K/m |
| $\tau$ | temperature at height $d$ divided by $T_0$ | none |
| $G$ | gravity over the gas constant, 9.80665 / 287.05 | K/m |
| $P$ | pressure at height $d$ | Pa |
| $\rho$, $c$ | density and speed of sound at height $h$ | kg/m³, m/s |

**How far from a standard day.** The pressure comes from the density, as dry air, and its pressure altitude from the standard-atmosphere law:

$$P_0 = R\,\rho_0\,T_0 \qquad H_p = \left[1 - \left(\frac{P_0}{P_s}\right)^{1/5.2559}\right]\frac{T_s}{L} \qquad \Delta T = T_0 - (T_s - L\,H_p)$$

$\Delta T$ is the rifle's temperature minus the standard temperature at that pressure altitude. Because $\rho_0$ is the drag density (set by `airDensity` and `vapour`), $P_0$ differs from the measured station pressure by the water-vapour term.

**The floor.** The air stops changing 800 ft below sea level, as an absolute altitude. As a height from the rifle that is $z_t - A$, and

$$d = \max\bigl(h,\ \min(z_t - A,\ 0)\bigr)$$

($A$ is used as given here, not floored.) For a site above the floor, $z_t - A$ is negative and $d$ is the height cut off at that depth. For a site already below the floor, $z_t - A$ is positive, the inner minimum is 0, and $d = \max(h, 0)$: nothing below the rifle counts, so a downhill shot flies in the rifle's own air, and only climbing changes it.

**One-sided.** The lapse is reduced only when the bullet moves toward the height where standard air would be as warm as the rifle's air: up on a colder-than-standard day ($\Delta T < 0$, $d > 0$), down on a hotter one ($\Delta T > 0$, $d < 0$). Exactly $\Delta T = 0$, or the opposite direction, keeps the full rate. The fraction of the lapse kept is

$$f = \begin{cases} \max\!\left(1 - \dfrac{\lvert\Delta T\rvert}{L\,H_t},\ 0\right) & \text{if } (\Delta T < 0 \text{ and } d > 0) \text{ or } (\Delta T > 0 \text{ and } d < 0) \\ 1 & \text{otherwise} \end{cases}$$

and the temperature is linear in $d$:

$$s = -f\,L \qquad \tau = \max\!\left(1 + \frac{s\,d}{T_0},\ 0.01\right) \qquad T = T_0\,\tau$$

On the reduced side this is the standard-day line seen from the rifle's temperature, leaned so that the gap between the two, $\Delta T\,(1 - \lvert d\rvert/H_t)$, shrinks to zero at $\lvert d\rvert = H_t$. The reduction is never extended past that: beyond $H_t$ the code simply keeps the linear temperature. $L\,H_t$ is 34.671 K; a deviation that large or larger gives $f = 0$ (constant temperature) on the reduced side. The 0.01 only guards against a non-positive temperature far above any shot.

**Pressure, density and speed of sound.** Pressure is hydrostatic in that linear temperature:

$$\ln\frac{P}{P_0} = \begin{cases} -\dfrac{G\,d}{T_0} & \text{if } \lvert s\rvert < 10^{-12} \\ -\dfrac{G}{s}\,\ln\tau & \text{otherwise} \end{cases}$$

$$\rho = \rho_0\,\frac{P}{P_0}\,\frac{T_0}{T} = \rho_0\,\frac{P}{P_0}\,\frac{1}{\tau} \qquad c = c_0\sqrt{\tau}$$

For $f > 0$ this is the closed form $\rho = \rho_0\,\tau^{\,G/(fL) - 1}$. With $f = 1$ the exponent is $G/L - 1 = 4.25593$, the density law of an atmosphere that cools at the standard rate from the rifle's own temperature (the `'path'` law of `lapse`, to the rounding of its exponent). With $f = 0$ the air is isothermal and the density falls as $e^{-G d/T_0}$.

Two properties follow. First, altitude enters only through the floor: the density and sound speed depend on $h$, the rifle's air and the deviation, not on how high the site is. Second, with the setting on, `'classic'` and `'classic-table'` give identical air, because they read the same height and have the same floor.

## The algorithm

This option adds one branch at the top of the single function that turns the air at the rifle and a height into the air at that height. The branch is taken before the lapse value is tested:

```text
airAt(air, h, lapse, sound, tempClamp) -> (rho, c)
  c0 = c0_moist if sound == 'moist' else c0_dry
  if tempClamp == 'classic' and lapse is 'classic', 'classic-table' or 'spinref':
      return classicTaperAir(air, h, c0)
  ...                                   // otherwise the lapse value's own air (see the lapse page)
```

The taper itself, in the order the code runs it:

```text
classicTaperAir(air, h, c0) -> (rho, c)
  fl = -243.84 - alt                       // the floor as a height relative to the rifle (m); alt is 0 when none given
  d  = max(h, min(fl, 0))
  dT = classicTaperDeviationK(air)
  toward = (dT < 0 and d > 0) or (dT > 0 and d < 0)
  f  = max(1 - |dT| / (0.0065 * 5334), 0) if toward else 1
  s  = -f * 0.0065
  tr = max(1 + s*d/T0, 0.01)
  T  = T0 * tr
  lnP = -(9.80665/287.05) * d / T0             if |s| < 1e-12
        -((9.80665/287.05) / s) * ln(tr)       otherwise
  return (rho0 * exp(lnP) * T0/T, c0 * sqrt(T/T0))

classicTaperDeviationK(air) -> dT (K)
  P0   = rho0 * 287.05 * T0
  pa_m = (1 - (P0/101325)^(1/5.2559)) * 288.15/0.0065
  return T0 - (288.15 - 0.0065*pa_m)
```

**Where it runs.** The flight integration asks `airAt` for the air at the bullet's height at each of its four evaluations per step, so the taper is evaluated all along the flight; once more at each requested range to report the Mach number, and once at height 0 for the muzzle Mach number when the Spin model's modified point-mass dynamics run. `rho0` has already been set to the density `airDensity` selects before the first call, so the deviation is computed from that density. The deviation does not change along the flight, so it is a fixed number for each solve. The height each lapse value passes in (line of sight, or the dialed path's real height) is described on the [lapse](lapse.md) page; this option does not change it.

## On a real shot

The option acts only for the three Classic values of `lapse`, so all three tables start from the Classic model, whose own setting is the reference row, and show `'off'` against it. The first two use the scenario's own air, which is warmer than a normal day at its pressure, so they show the taper acting toward the standard side on the way down. The first reads the air along the line of sight; the second reads it at the bullet's real height, so a level shot is also affected. The third makes the air cold (0 °F, same pressure and humidity), where the taper acts on the way up.

Read from the tables below (every number in this paragraph is copied from them). First table. On the level shot `'off'` shows 0.000 / 0.000 / 0.0: the line of sight never leaves the rifle's height, so the taper has nothing to act on. On the slopes, with the taper off the shot needs -0.055 mil uphill and -0.029 mil downhill, relative to the taper on. Why, from the math: to first order the taper's density falls with height as $\exp(-(G - fL)\,d/T_0)$, so a smaller $f$ means density falls faster going up and rises faster going down. Uphill the warm air is on the plain side ($f = 1$): the taper uses the standard rate from the rifle's own temperature, while the `'off'` air is the standard-atmosphere ratio between absolute altitudes at the 5,500 ft site, which falls a little faster, so `'off'` has thinner air, less drag and needs less elevation. Downhill the warm air is on the reduced side ($f < 1$), so the taper's density rises faster on the way down: more drag with the taper, and again `'off'` needs less. In this table `'off'` also holds the speed of sound at the rifle's value while the taper lets it follow the temperature. Second table: with the air read at the bullet's real height the level shot moves too, by -0.010 mil, because the arc rises above the rifle and the two airs differ there; the slopes are -0.055 mil uphill and -0.037 mil downhill.

Third table, cold air. The level shot is again 0.000. Uphill `'off'` needs +0.336 mil more than the taper, the opposite sign and several times the size of anything in the warm table. At 0 °F the deviation from a normal day at this pressure is large, so the reduced side (uphill) has a much smaller $f$: the taper's density falls much faster on the way up, thinner air and less drag, and the shot with the taper off, in denser air, needs more elevation. Downhill the cold air is on the plain side and the cell is -0.071 mil, the same kind of difference as the warm uphill cell. The reduced side acts on whichever way leads toward a normal day: down on a warm day, up on a cold one. A cold version of the second table was not added, to keep the page short; on a cold day the arc of a level shot rises on the reduced side, so that table would show a level shot moving.

**Warm air (the scenario's own), air read along the line of sight**

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 Classic 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 | North, 10° uphill | North, 10° downhill |
|---|---|---|---|---|
| `'off'` | Off (Standard) | 0.000 / 0.000 / 0.0 | -0.055 / -0.010 / +3.3 | -0.029 / +0.002 / -1.4 |
| `'classic'` | Classic (cold or hot days ease toward normal) | reference | reference | reference |

**Warm air (the scenario's own), air read at the bullet’s real height**

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 Classic model's, except: Air along the path: Classic, bullet’s real height. In the first column (North, level) the reference arc reaches 221 ft above the line of sight at 2150 yd.

| Value | Shown in the app as | North, level | East, level | North, 10° uphill | North, 10° downhill |
|---|---|---|---|---|---|
| `'off'` | Off (Standard) | -0.010 / -0.001 / +0.1 | -0.010 / -0.001 / +0.1 | -0.055 / -0.004 / +0.6 | -0.037 / -0.005 / +1.3 |
| `'classic'` | Classic (cold or hot days ease toward normal) | reference | reference | reference | reference |

**Cold air (0 °F, the scenario’s pressure and humidity), air read along the line of sight**

The shot: a 350 gr 0.375 in bullet at 3048 fps muzzle velocity, fired at 3520 yd in air of 0 °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. The air is changed from the scenario's for this table: temperature 0 °F. All other settings are the Classic model's. In the first column (North, level) the reference arc reaches 268 ft above the line of sight at 2180 yd.

| Value | Shown in the app as | North, level | North, 10° uphill | North, 10° downhill |
|---|---|---|---|---|
| `'off'` | Off (Standard) | 0.000 / 0.000 / 0.0 | +0.336 / +0.019 / -2.3 | -0.071 / +0.002 / -1.7 |
| `'classic'` | Classic (cold or hot days ease toward normal) | reference | reference | reference |

Each cell is the change from the reference row (`'classic'`) 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.

---

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