Show only reliable tracks in interactive mode

This commit is contained in:
Oliver Jowett 2019-11-27 20:36:33 +08:00
parent 429e34db21
commit 9500a2f2f7
1 changed files with 56 additions and 57 deletions

View File

@ -115,16 +115,12 @@ void interactiveShowData(void) {
int row = 2; int row = 2;
while (a && row < rows) { while (a && row < rows) {
if (a->reliable && (now - a->seen) < Modes.interactive_display_ttl) {
if ((now - a->seen) < Modes.interactive_display_ttl)
{
int msgs = a->messages;
if (msgs > 1) {
char strSquawk[5] = " "; char strSquawk[5] = " ";
char strFl[7] = " "; char strFl[7] = " ";
char strTt[5] = " "; char strTt[5] = " ";
char strGs[5] = " "; char strGs[5] = " ";
int msgs = a->messages;
if (trackDataValid(&a->squawk_valid)) { if (trackDataValid(&a->squawk_valid)) {
snprintf(strSquawk,5,"%04x", a->squawk); snprintf(strSquawk,5,"%04x", a->squawk);
@ -153,8 +149,12 @@ void interactiveShowData(void) {
if (a->adsb_version >= 0) { if (a->adsb_version >= 0) {
strMode[1] = '0' + a->adsb_version; strMode[1] = '0' + a->adsb_version;
} }
if (a->modeA_hit) {strMode[2] = 'a';} if (a->modeA_hit) {
if (a->modeC_hit) {strMode[3] = 'c';} strMode[2] = 'a';
}
if (a->modeC_hit) {
strMode[3] = 'c';
}
if (trackDataValid(&a->position_valid)) { if (trackDataValid(&a->position_valid)) {
snprintf(strLat, 8,"%7.03f", a->lat); snprintf(strLat, 8,"%7.03f", a->lat);
@ -175,7 +175,6 @@ void interactiveShowData(void) {
strLat, strLon, 10 * log10(signalAverage), msgs, (now - a->seen)/1000.0); strLat, strLon, 10 * log10(signalAverage), msgs, (now - a->seen)/1000.0);
++row; ++row;
} }
}
a = a->next; a = a->next;
} }