Skip to content

Commit

Permalink
fixed TSS ME 11 check in ModeSDecoder
Browse files Browse the repository at this point in the history
was checking the wrong bit
  • Loading branch information
fixje committed Mar 16, 2021
1 parent 7789d70 commit b1dfb78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/opensky/libadsb/ModeSDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public ModeSReply decode(ModeSReply modes) throws BadFormatException, Unspecifie
if (ftc == 29) {
int subtype = (es1090.getMessage()[0]>>>1) & 0x3;
// DO-260B 2.2.3.2.7.1: ignore for ADS-B v0 transponders if ME bit 11 != 0
boolean hasMe11Bit = (es1090.getMessage()[1]&0x40) != 0;
boolean hasMe11Bit = (es1090.getMessage()[1]&0x20) != 0;

if (subtype == 1 && (dd.adsbVersion > 0 || !hasMe11Bit)) {
return new TargetStateAndStatusMsg(es1090);
Expand Down

0 comments on commit b1dfb78

Please sign in to comment.