Skip to content

Commit

Permalink
filter out all false-positive Sapling2 beacons
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Oct 13, 2023
1 parent f0f17be commit f347814
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public void readBeacon(byte[] data) throws IOException, UncorrectableException {
id = dis.readUnsignedByte();
flags = dis.readUnsignedByte();
callsign = StreamUtils.readString(dis, 6);
// no way to tell if packet valid telemetry or unsupported communication type
// use known callsign to filter out all false-positive reception packets
if (!callsign.equalsIgnoreCase("KN6HCC")) {
throw new UncorrectableException("invalid callsign: " + callsign);
}

int raw = dis.readUnsignedByte();
if ((raw & 1) == 1) {
Expand Down Expand Up @@ -330,7 +335,7 @@ public void setAlt(float alt) {
public Double getDatetime() {
return datetime;
}

public void setDatetime(Double datetime) {
this.datetime = datetime;
}
Expand Down

0 comments on commit f347814

Please sign in to comment.