Skip to content

Commit 20eab1d

Browse files
committed
TCAS Resolution Advisory only for v2
FTC=28 subcode=2 was handled as TCASResolutionAdvisoryMsg, yet this is only valid for V2 targets. For V0 and V1 targets, this format combination is undefined and should rather return the ExtendedSquitter. Fixes #42
1 parent 40e3457 commit 20eab1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/de/serosystems/lib1090/StatefulModeSDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ public ModeSDownlinkMsg decode(ModeSDownlinkMsg modes, long timestamp) throws Ba
173173
if (ftc == 28) { // aircraft status message, check subtype
174174
int subtype = es1090.getMessage()[0] & 0x7;
175175

176-
if (subtype == 1) // emergency/priority status
176+
if (subtype == 1)
177177
return new EmergencyOrPriorityStatusMsg(es1090);
178-
if (subtype == 2) // TCAS resolution advisory report
178+
if (subtype == 2 && dd.adsbVersion > 1)
179179
return new TCASResolutionAdvisoryMsg(es1090);
180180
}
181181

0 commit comments

Comments
 (0)