The 1090 Megahertz Riddle (second edition)

A Guide to Decoding Mode S and ADS-B Signals
By: Junzi Sun (junzis.com)

Airborne velocity

Airborne velocities are all transmitted with Type Code 19 (TC=19). Four different subtypes are defined in bits 6-8 of ME field. With subtypes 1 and 2, ground speeds of aircraft are reported. With subtypes 3 and 4, aircraft true airspeed or indicated airspeed are included. Reporting of airspeed in ADS-B only occurs when aircraft position can not be determined based on the GNSS system.1

Among all four different sub-types, sub-type 2 and 4 are designed for supersonic aircraft. Their message structures are identical to subtypes 1 and 3, but with the speed resolution of 4 kt instead of 1 kt. However, since there are no operational supersonic airliners currently, there is no ADS-B airborne velocity message with sub-type 2 and 4.

These messages contain more information than just horizontal and vertical velocity. Two other significant types of information are the navigation uncertainty category for velocity, and the difference between the GNSS height and barometric altitude. For instance, the study in has made use of the later information to better model the air temperature at higher altitudes.

All sub-types share a similar overall message structure, with the different definitions from message bits 14 to 35 (or frame bits 46 to 67). The general structure of the message is shown in Table 1.1.

Airborne velocity message structure
FIELD MSG ME BITS
Type Code TC 33-37 1-5 5
  TC=19 [Binary: 10011]
Sub-type ST 38-40 6-8 3
  1: Subsonic
  2: Supersonic
Intent change flag IC 41 9 1
IFR capability flag IFR 42 10 1
Navigation uncertainty category for velocity 43-45 11-13 3
  ADS-B version 0 NUCr
  ADS-B version 1-2 NUCv
Sub-type specific fields 46-67 14-35 22
  Refer to Table 1.2 and Table 1.3
Source bit for vertical rate VrSrc 38 36 1
  0: GNSS, 1: Barometer
Sign bit for vertical rate Svr 69 37 1
  0: Up, 1: Down
Vertical rate VR 70-78 38-46 9
  All zeros: no information
  LSB: 64 ft/min
  VR = 64 x (Decimal value - 1)
Reserved 79-80 47-48 2
Sign bit for GNSS and Baro altitudes difference SDif 81 49 1
  0: GNSS alt above Baro alt
  1: GNSS alt below Baro alt
Difference between GNSS and Baro altitudes dAlt 82-88 50-56 7
  All zeros: no information
  LSB: 25 ft

Comparing to position messages, the decoding of velocity messages is more straight forward since there is no complicated encoding scheme. In this chapter, we are going to explain the decoding process.

Example messages

Throughout this chapter, we will use two example messages to illustrate the decoding process:

Message A:  8D485020994409940838175B284F (sub-type 1)
Message B:  8DA05F219B06B6AF189400CBC33F (sub-type 3)

By decomposing the messages, the downlink format, ICAO address, ME field, and CRC remainder are shown as follows:

Message A (sub-type 1):
+----+--------+----------------+--------+
| DF | ICAO   | ME             |  CRC   |
+----+--------+----------------+--------+
| 8D | 485020 | 99440994083817 | 5B284F |
+----+--------+----------------+--------+
Message B (sub-type 3):
+----+--------+----------------+--------+
|    | ICAO   | ME             |  CRC   |
+----+--------+----------------+--------+
| 8D | A05F21 | 9B06B6AF189400 | CBC33F |
+----+--------+----------------+--------+

Next, we can convert both ME fields of the messages into binary and decompose the structure further as follows:

Message A (sub-type 1):
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|TC   |ST |IC|IFR|NUC|           |VrSrc|Svr|VR       |RESV|SDif|DAlt   |
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|10011|001|0 |1  |000|10000001001|0    |1  |000001110|00  |0   |0010111|
|     |   |  |   |   |10010100000|     |   |         |    |    |       |
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|19   |1  |0 |1  |0  |           |0    |1  |14       |0   |0   |23     |
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
Message B (sub-type 3):
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|TC   |ST |IC|IFR|NUC|           |VrSrc|Svr|VR       |RESV|SDif|DAlt   |
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|10011|011|0 |0  |000|11010110110|1    |1  |000100101|00  |0   |0000000|
|     |   |  |   |   |10101111000|     |   |         |    |    |       | 
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+
|5    |3  |0 |0  |0  |           |1    |1  |37       |0   |0   |0      |
+-----+---+--+---+---+-----------+-----+---+---------+----+----+-------+

Here, the second rows and third rows of the messages are binary and decimal values respectively.

Vertical rate

The method for decoding vertical rate and its related parameters are the same among all different sub-types of the messages.

First of all, the vertical rate source bit VrSrc (ME bit 36) indicates the source of the altitude measurements. In the case of , the GNSS altitude is encoded. In the case of , the barometer altitude is encoded.

The direction of vertical movement of aircraft can be read from Svr bit (ME bit 37), with and referring to climb and descent respectively. The encoded vertical rate value VR can be computed using message ME bits 38 to 46. If the 9-bit block contains all zeros, the vertical rate information is not available.

The final vertical rate (\(\mathrm{VS}\)) is calculated as:

\[\mathrm{VS} = (2S_{vr} - 1) \cdot 64 \cdot (V_R - 1)\]

where the final vertical speed has the unit of ft/min.

Based on the example Message A, the vertical speed is calculated as:

\[\mathrm{VS}_A = (2 \times 0 - 1) \times 64 \times (37 -1) = -832 ~\text{ft/min}\]

which indicates that the aircraft A is descending with a vertical speed of 832 ft/min.

Based on the example Message B, the vertical speed is calculated as:

\[\mathrm{VS}_B = (2 \times 0 - 1) \times 64 \times (14 -1) = -2304 ~\text{ft/min}\]

which indicates that the aircraft B is descending with a vertical speed of 2304 ft/min.

GNSS and barometric altitudes difference

The last 8 bits of the ME filed contain the difference between the barometric and GNSS altitudes.

Within these 8 bits, the first bit indicates the sign for the value in the last 7 bits. When it is , the value is negative. This means the GNSS altitude is below the barometric altitude.

The value is encoded with the increment of 25 ft, and the equation to calculate the altitude difference is:

\[\Delta h = s (n - 1) \times 25\]

where \(s\) is the sign and \(n\) is the decimal value of the encoded difference.

Based on the example Message A, the difference between GNSS and barometric altitude is:

\[\Delta h = 1 (23 - 1) \times 25 = 550 ~\text{ft}\]

When all the bits are zeros (as shown in Message B) or ones, the information is not available.

Sub-type 1 and 2: ground speed decoding

The velocity information fields of subtype 1 and 2 messages consist of the East-West velocity component and the North-South velocity component, as well as the signs for these two values. The structure of ME bits 14 to 35 is shown in Table 1.2.

Velocity fields of sub-type 1 and 2 (ME bit 14 to 35)
FIELD MSG ME BITS
Direction for E-W velocity component Dew 46 14 1
  0: from West to East
  1: from East to West
East-West velocity component Vew 47-56 15-24 10
  All zeros: no information available
  Sub-type 1: Speed = Decimal value - 1
  Sub-type 2: Speed = 4 x (Decimal value - 1)
  Unit: knots
Direction for N-S velocity component Dns 57 25 1
  0: from South to North
  1: from North to South
North-South velocity component Vns 58-67 26-35 10
  All zeros: no information available
  Sub-type 1: Speed = Decimal value - 1
  Sub-type 2: Speed = 4 x (Decimal value - 1)
  Unit: knots

Here, we can see that ME bits 14 and 25 are sign bits indicating the directions of each component. Each 10-bit block following these sign bits encodes a velocity component. It is important to point out that when any of the 10-bit blocks contains only zeros, no velocity information is available. For supersonic velocity (sub-type 2), the final velocity components are multiplied by a factor of 4.

To calculate the velocity, four values are needed: Sew, Vew, Sns, Vns. In aviation, it is commonly considers the West-East and South-North components as positive values, which are denoted as \(V_x\) and \(V_y\). The formulas for sub-type 1 (subsonic) and sub-type 2 (supersonic) differ by a factor of 4.

For subsonic speed (sub-type 1), the speed components can be computed as:

\[\begin{aligned} V_x &= (-2S_{ew} + 1) (V_{ew} - 1) \\ V_y &= (-2S_{ns} + 1) (V_{ns} - 1)\end{aligned}\]

For supersonic speed (sub-type 2), the speed components can be computed as:

\[\begin{aligned} V_x &= 4 \cdot (-2S_{ew} + 1) (V_{ew} - 1)\\ V_y &= 4 \cdot (-2S_{ns} + 1) (V_{ns} - 1)\end{aligned}\]

The final ground speed (\(V\)) of aircraft is:

\[V = \sqrt{V_x^2 + V_y^2}\]

With these two speed components, the ground track angle (\(\lambda\)) of the aircraft can also be calculated conveniently:

\[\begin{aligned} \lambda &= arctan2 \left( V_x, V_y \right) \cdot \frac{360}{2\pi} \\ \lambda &= mod(\lambda, 360) \label{eq:ground_track_mod_360}\end{aligned}\]

where Equation [eq:ground_track_mod_360] ensures the track angle range of [0, 360] degree, with North at 0 degrees, which is the case for most aviation applications and studies.

Base on the example message A given earlier:

Message A, ME bit 14-35
+-----+------------+-----+------------+-------+
| Sew | Vew        | Sns | Vns        | VrSrc |
+-----+------------+-----+------------+-------+
| 1   | 0000001001 | 1   | 0010100000 | 0     |
+-----+------------+-----+------------+-------+
| 1   | 9          | 1   | 160        | 0     |
+-----+------------+-----+------------+-------+

The final aircraft speed and track angle are calculated as:

\[\begin{aligned} V_x &= (-2 \times 1 + 1) \times (9 - 1) = -8 \\ V_y &= (-2 \times 1 + 1) \times (160 - 1) = -159 \\ V &= \sqrt{(-9)^2+ (-160)^2} = 159.20 \\ \lambda &= arctan2(-9, -160) \times \frac{360}{2\pi} = 182.88\end{aligned}\]

where the aircraft speed is 159.20 kt and the track angle is 182.88 degrees.

Subtype 3 and 4: airspeed decoding

ADS-B velocity messages with sub-type 3 or 4 are broadcast when the ground speed of the aircraft is not known. This could happen when, for example, aircraft positions cannot be obtained due to the low availability of GNSS satellites.

Previously, we see the ground speeds in sub-type 1 and 2 are encoded as the East-West and North-South components. We then convert these two components to speed and track angle. In sub-type 3 or 4, the speed and heading directly encoded. The details on related fields are described in Table 1.3.

Velocity fields of sub-type 3 and 4 (ME bit 14 to 35)
FIELD MSG ME BITS
Status bit for magnetic heading SH 46 14 1
  0: not available
  1: available
Magnetic heading HDG 47-56 15-24 10
  LSB: 360/1024 degrees
  Heading = Decimal value x 360 / 1024
Airspeed type T 57 25 1
  0: Indicated airspeed (IAS)
  1: True airspeed (TAS)
Airspeed AS 58-67 26-35 10
  All zeros: no information available
  Sub-type 1: Speed = Decimal value - 1
  Sub-type 2: Speed = 4 x (Decimal value - 1)
  Unit: knots

The magnetic heading (\(\phi\)) of the aircraft is calculated as:

\[\phi = \mathrm{HDG} \cdot \frac{360}{1024} \quad \text{degrees}\]

The speed calculations also differ between sub-type 3 and 4. For sub-type 3, the airspeed can be computed as:

\[V_{as} = \mathrm{AS} - 1\]

While for sub-type 4, the airspeed is computed as:

\[V_{as} = 4 \cdot (\mathrm{AS} - 1)\]

Note that the airspeed type bit T represents whether the value is the indicated airspeed (IAS, T=0) or true airspeed (TAS, T=1).

Now, let us reflect on our previous example Message B:

Message B, ME bit 14-35
+----+------------+---+------------+
| SH | HDG        | T | AS         |
+----+------------+---+------------+
| 1  | 1010110110 | 1 | 0101111000 |
+----+------------+---+------------+
| 1  | 694        | 1 | 376        |
+----+------------+---+------------+

With heading status SH=1, we know that the magnetic heading information is available. Thus, the heading and airspeed can be derived as:

\[\begin{aligned} \phi &= 694 \times \frac{360}{1024} = 243.98 \\ V_{as} &= 376 - 1 = 375\end{aligned}\]

With airspeed type T=1, we can also determine that the speed refers to the true airspeed of the aircraft.

Try it out Using pyModeS, we can perform the decoding the airborne velocities messages as follows:

import pyModeS as pms

msgA = "8D485020994409940838175B284F"
msgB = "8DA05F219B06B6AF189400CBC33F"

vA = pms.adsb.velocity(msgA)
vB = pms.adsb.velocity(msgB)

We have the following decoded values.

vA: (159, 182.88, -832, 'GS')
vB: (375, 243.98, -2304, 'TAS')

Note that the parameters returned by the velocity() function are speed, track angle (or heading), vertical speed, and speed type.


  1. In the real world, subtype 3 messages are very rare.↩︎

Site maintained by @junzis. Build with LaTeX, Pandoc, and GitHub