Skip to content

Commit

Permalink
BDS50 if GS > 600 kts it is probably invalid as BDS50 message
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglasdc3 committed Nov 15, 2020
1 parent b16aba5 commit 580d944
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main/java/aero/t2s/modes/decoder/df/bds/Bds50.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,16 @@ public Bds50(short[] data) {
trueTrack = trueTrack * TRUE_TRACK_ANGLE_ACCURACY + (isWest ? 180d : 0d);

gs = ((data[7] << 2) | ((data[8] >>> 6) & 0x3)) * SPEED_ACCURACY;
if (!statusGs && gs != 0) {
invalidate();
return;
if (statusGs) {
if (gs > 600) {
invalidate();
return;
}
} else {
if (gs != 0) {
invalidate();
return;
}
}

boolean isTrackAngleRateNegative = (data[8] & 0b00010000) != 0;
Expand Down

0 comments on commit 580d944

Please sign in to comment.