Overhaul mode A/C matching to be much cheaper.
The old matching process which tracked mode A values as pseudo-aircraft got very, very expensive with a large number of mode A/C messages (and with lots of single-bit errors, which seems common with a Beast doing the reception) Instead just count A/C messages directly into a 4096-entry array (which is very fast) and periodically scan the mode S aircraft list to see if we can match anything up (which is fixed overhead + cost proportional to the number of mode S aircraft)
This commit is contained in:
parent
60f1f3bcb6
commit
25ea6d398b
6 changed files with 111 additions and 140 deletions
2
mode_s.c
2
mode_s.c
|
|
@ -1806,7 +1806,7 @@ void useModesMessage(struct modesMessage *mm) {
|
|||
// If this is the second message, and we
|
||||
// squelched the first message, then re-emit the
|
||||
// first message now.
|
||||
if (!Modes.net_verbatim && a->messages == 2) {
|
||||
if (!Modes.net_verbatim && a && a->messages == 2) {
|
||||
modesQueueOutput(&a->first_message, a);
|
||||
}
|
||||
modesQueueOutput(mm, a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue