Mlat synthetic message detection.
Notice synthetic mlat messages by looking for messages with a magic timestamp value. If they arrive, tag the derived data as mlat-derived. Don't include mlat-derived output in FATSV output to avoid loops.
This commit is contained in:
parent
8f08c1b87f
commit
12a7d45e75
6 changed files with 33 additions and 7 deletions
8
mode_s.c
8
mode_s.c
|
|
@ -59,6 +59,11 @@
|
|||
//
|
||||
//
|
||||
|
||||
/* A timestamp that indicates the data is synthetic, created from a
|
||||
* multilateration result
|
||||
*/
|
||||
#define MAGIC_MLAT_TIMESTAMP 0xFF01A71A71A7ULL
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// Given the Downlink Format (DF) of the message, return the message length in bits.
|
||||
|
|
@ -563,6 +568,9 @@ int decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
|
|||
|
||||
mm->bFlags = 0;
|
||||
|
||||
if (mm->remote && mm->timestampMsg == MAGIC_MLAT_TIMESTAMP)
|
||||
mm->bFlags |= MODES_ACFLAGS_FROM_MLAT;
|
||||
|
||||
// AA (Address announced)
|
||||
if (mm->msgtype == 11 || mm->msgtype == 17 || mm->msgtype == 18) {
|
||||
mm->addr = (msg[1] << 16) | (msg[2] << 8) | (msg[3]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue