Skip to main content
gr-adsb decodes ten Mode S Downlink Formats (DFs). Each DF maps to a fixed message length and a specific set of decoded fields. This page documents every supported DF and the ADS-B Type Codes (TC) found inside Extended Squitter messages. The DF is encoded in the first 5 bits of every Mode S message. The table below lists all supported formats.
DFNameLengthKey fields
0Short Air-Air Surveillance (ACAS)56 bitsVS, RI, Altitude, CC
4Surveillance Altitude Reply56 bitsFS, DR, IIS, IDS, Altitude
5Surveillance Identity Reply56 bitsFS, DR, IIS, IDS, Identity Code
11All-Call Reply56 bitsCA, AA (ICAO address)
16Long Air-Air Surveillance (ACAS)112 bitsVS, RI, Altitude, VDS1, VDS2
17Extended Squitter112 bitsCA, AA, ME (Message Extended Squitter)
18Extended Squitter/Non-Transponder112 bitsCF, AA, ME
19Military Extended Squitter112 bitsAF, AA, ME
20Comm-B Altitude Reply112 bitsFS, DR, IIS, IDS, Altitude, MB
21Comm-B Identity Reply112 bitsFS, DR, IIS, IDS, Identity, MB
Formats not listed above (e.g., DF 2, 3, 6–10, 12–15) are decoded as “Reserved” and are not processed. DF 22–31 are partially named in the lookup table but are not fully decoded.

Short messages (56 bits)

Transmitted by ACAS-equipped aircraft in response to an air-to-air interrogation (UF 0). Carries basic surveillance data.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 0
Vertical Status (VS)10 = In Air, 1 = On Ground
Crosslink Capability (CC)1Whether the transponder supports crosslink
Reply Information (RI)4ACAS capability and max speed category
Altitude Code13Encoded barometric altitude in feet
Address/Parity (AP)24CRC XOR’d with the ICAO address
CRC is verified by XOR-ing the AP field with the computed CRC; the result must match a known ICAO address in the plane dictionary.
Reply to a Mode S altitude interrogation. Provides flight status and barometric altitude.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 4
Flight Status (FS)3Alert, SPI, and on-ground/in-air status
Downlink Request (DR)5Whether the aircraft has data to downlink
IIS4Interrogator Identifier Subfield
IDS2Identifier Designator Subfield
Altitude Code13Encoded barometric altitude in feet
Address/Parity (AP)24CRC XOR’d with the ICAO address
Reply to a Mode S identity interrogation. Provides flight status and the Mode A squawk code.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 5
Flight Status (FS)3Alert, SPI, and on-ground/in-air status
Downlink Request (DR)5Whether the aircraft has data to downlink
IIS4Interrogator Identifier Subfield
IDS2Identifier Designator Subfield
Identity Code13Mode A squawk code (4-digit octal)
Address/Parity (AP)24CRC XOR’d with the ICAO address
Broadcast reply to an all-call interrogation. This is one of the two message types (along with DF 17) that directly reveals an aircraft’s ICAO 24-bit address in plain text. gr-adsb uses DF 11 to populate the plane dictionary, enabling parity checks on subsequent DF 0/4/5 messages.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 11
Capability (CA)3Transponder level and flight status capability
Address Announced (AA)24ICAO 24-bit aircraft address
Parity/Interrogator ID (PI)24CRC check field
CRC is a direct comparison: PI must equal the computed CRC over bits 0–31.

Long messages (112 bits)

Extended version of DF 0. Used by ACAS for coordination between aircraft. The MV (Message, Version) field carries ACAS coordination data.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 16
Vertical Status (VS)10 = In Air, 1 = On Ground
Reply Information (RI)4ACAS capability and max speed
Altitude Code13Encoded barometric altitude in feet
VDS14First nibble of the Version/Data Subfield
VDS24Second nibble of the Version/Data Subfield
Address/Parity (AP)24CRC XOR’d with the ICAO address
Full MV field decoding is noted as not yet implemented in the source.
The primary ADS-B message type. Broadcast spontaneously by Mode S transponders with ADS-B capability. Contains the ICAO address and a 56-bit ME field whose content is identified by the Type Code (TC).Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 17
Capability (CA)3Transponder level and flight status capability
Address Announced (AA)24ICAO 24-bit aircraft address
Message Extended Squitter (ME)56ADS-B payload; first 5 bits are the Type Code
Parity/Interrogator ID (PI)24CRC check field
CRC is a direct comparison: PI must equal the computed CRC over bits 0–87. See Type Codes below for ME field details.
ADS-B messages from non-Mode-S sources, including TIS-B ground stations and ADS-R rebroadcasts. The 3-bit CF (Control Field) determines the source and address type.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 18
CF3Control Field — identifies message source
Address Announced (AA)24ICAO address (CF=0) or anonymous address (CF=1)
Message Extended Squitter (ME)56Payload; decoded like DF 17 when CF is 0, 1, or 6
Parity/Interrogator ID (PI)24CRC check field
CF values:
CFMeaning
0AA field is the ICAO address
1AA field is an anonymous address
2Fine TIS-B message using ICAO address
3Coarse TIS-B airborne position/velocity message
4TIS-B and ADS-R management message
5Fine TIS-B using non-ICAO address
6ADS-B rebroadcast
7Reserved
Extended Squitter used by military aircraft. The 3-bit AF (Application Field) identifies the message type. Only AF=0 (ADS-B Message) is decoded; all other AF values are reserved for military use.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 19
AF3Application Field — 0 = ADS-B message
Address Announced (AA)24ICAO 24-bit aircraft address
Message Extended Squitter (ME)56ADS-B payload decoded like DF 17 when AF=0
Parity/Interrogator ID (PI)24CRC check field
Extended version of DF 4. Carries altitude plus a 56-bit Comm-B message (MB field) used for Mode S data link services.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 20
Flight Status (FS)3Alert, SPI, and on-ground/in-air status
Downlink Request (DR)5Downlink request indicator
IIS4Interrogator Identifier Subfield
IDS2Identifier Designator Subfield
Altitude Code13Encoded barometric altitude in feet
Message Comm-B (MB)56Comm-B data link payload
Address/Parity (AP)24CRC XOR’d with the ICAO address
MB field decoding is noted as not yet implemented in the source.
Extended version of DF 5. Carries the Mode A squawk code plus a 56-bit Comm-B message.Decoded fields:
FieldBitsDescription
Downlink Format (DF)5Always 21
Flight Status (FS)3Alert, SPI, and on-ground/in-air status
Downlink Request (DR)5Downlink request indicator
IIS4Interrogator Identifier Subfield
IDS2Identifier Designator Subfield
Identity Code13Mode A squawk code
Message Comm-B (MB)56Comm-B data link payload
Address/Parity (AP)24CRC XOR’d with the ICAO address
MB field decoding is noted as not yet implemented in the source.

Type Codes

For DF 17, 18 (CF=0/1/6), and 19 (AF=0), the first 5 bits of the ME field carry the Type Code (TC), which identifies the ADS-B information that follows.
Broadcasts the aircraft’s callsign (flight number or registration). The callsign is 8 characters, each encoded using 6 bits and mapped through a 64-character lookup table (CALLSIGN_CHAR_LUT).
TCCategory set
1Category Set D
2Category Set C
3Category Set B
4Category Set A
The callsign is extracted from bits 40–87 of the full 112-bit message (8 characters × 6 bits = 48 bits):
CALLSIGN_CHAR_LUT = "_ABCDEFGHIJKLMNOPQRSTUVWXYZ_____ _______________0123456789______"

callsign = ""
for ii in range(0, 8):
    callsign += CALLSIGN_CHAR_LUT[self.bin2dec(self.bits[40 + ii*6 : 40 + (ii+1)*6])]
callsign = callsign.replace("_", "")
Ground position and movement data for taxiing aircraft. Decoding is not yet implemented in gr-adsb. Messages are forwarded on the unknown output port.
TCDescription
5–8Surface Position
The most common position message type. Carries barometric altitude and CPR-encoded latitude/longitude.Decoded fields (bits relative to the 112-bit message):
FieldBitsDescription
Surveillance Status (SS)bits 37–38Emergency, alert, or SPI condition
NIC Supplement-Bbit 39Navigation Integrity Category supplement
Altitude Code (AC-12)bits 40–51Barometric altitude (12-bit encoding)
Time (T)bit 52Whether timestamp is synced to 0.2 s UTC epoch
CPR Frame Flagbit 530 = even frame, 1 = odd frame
CPR Latitudebits 54–7017-bit CPR-encoded latitude
CPR Longitudebits 71–8717-bit CPR-encoded longitude
Both even and odd frames must be received within CPR_TIMEOUT_S = 30 seconds for a position fix to be computed.
TCDescription
9–18Airborne Position (Baro Altitude)
Speed, heading, and vertical rate. Two subtypes are defined:
  • ST 1/2 (Ground velocity): East-west and north-south velocity components are decoded separately and combined to produce speed (knots) and heading (degrees).
  • ST 3/4 (Air velocity): Airspeed and heading relative to the air mass.
Ground velocity fields (ST 1/2):
FieldBitsDescription
Intent Change (IC)bit 40Whether the aircraft intent has changed
NACbits 42–44Navigation Accuracy Category
S-EWbit 45East-west velocity sign
V-EWbits 46–55East-west velocity magnitude (knots + 1)
S-NSbit 56North-south velocity sign
V-NSbits 57–66North-south velocity magnitude (knots + 1)
VR Sourcebit 670 = GNSS/INS, 1 = barometric
S-VRbit 68Vertical rate sign
VRbits 69–77Vertical rate magnitude (64 ft/min per LSB)
Speed and heading are computed as:
velocity_we = (v_ew - 1) * (-1 if s_ew == 1 else 1)
velocity_sn = (v_ns - 1) * (-1 if s_ns == 1 else 1)
speed   = np.sqrt(velocity_sn**2 + velocity_we**2)
heading = np.arctan2(velocity_sn, velocity_we) * 360.0 / (2.0 * np.pi)
vertical_rate = (vr - 1) * 64 * (-1 if s_vr == 1 else 1)
Like TC 9–18 but uses GNSS geometric height instead of barometric altitude. Decoding is not yet implemented in gr-adsb. Messages are forwarded on the unknown output port.
TCDescription
20–22Airborne Position (GNSS Height)
Reports emergency and priority status. Decoding is not yet implemented in gr-adsb.
Reports autopilot target altitude and heading (Version 2 format). Decoding is not yet implemented in gr-adsb.
Reports operational capabilities and version information. Decoding is not yet implemented in gr-adsb.
Unimplemented Type Codes are published on the unknown message port of the Decoder block. You can connect a PDU sink or custom block to that port to inspect or handle them independently.

Build docs developers (and LLMs) love