Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ public ModeSDownlinkMsg decode(ModeSDownlinkMsg modes, long timestamp) throws Ba
if (ftc == 28) { // aircraft status message, check subtype
int subtype = es1090.getMessage()[0] & 0x7;

if (subtype == 1) // emergency/priority status
if (subtype == 1)
return new EmergencyOrPriorityStatusMsg(es1090);
if (subtype == 2) // TCAS resolution advisory report
if (subtype == 2 && dd.adsbVersion > 1)
return new TCASResolutionAdvisoryMsg(es1090);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public Integer getAltitude() {

@Override
public Position.AltitudeType getAltitudeType () {
if (getFormatTypeCode() >= 9 && getFormatTypeCode() <= 18)
if (getFormatTypeCode() == 0 || (getFormatTypeCode() >= 9 && getFormatTypeCode() <= 18))
return Position.AltitudeType.BAROMETRIC_ALTITUDE;
else if (getFormatTypeCode() >= 20 && getFormatTypeCode() <= 22)
return Position.AltitudeType.ABOVE_WGS84_ELLIPSOID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public Integer getAltitude() {

@Override
public Position.AltitudeType getAltitudeType () {
if (getFormatTypeCode() >= 9 && getFormatTypeCode() <= 18)
if (getFormatTypeCode() == 0 || (getFormatTypeCode() >= 9 && getFormatTypeCode() <= 18))
return Position.AltitudeType.BAROMETRIC_ALTITUDE;
else if (getFormatTypeCode() >= 20 && getFormatTypeCode() <= 22)
return Position.AltitudeType.ABOVE_WGS84_ELLIPSOID;
Expand Down
Loading