Make faup1090 emit iSource to say where the ident came from.

This commit is contained in:
Oliver Jowett 2016-09-01 19:11:33 +01:00
parent 3e08de91ed
commit 303d3c3fef

View file

@ -1861,6 +1861,21 @@ static void writeFATSV()
if (trackDataValidEx(&a->callsign_valid, now, 120000, SOURCE_MODE_S_CHECKED)) { // we accept quite old idents as they shouldn't change often
p += snprintf(p, bufsize(p,end), "\tident\t%s", a->callsign);
switch (a->callsign_valid.source) {
case SOURCE_MODE_S:
p += snprintf(p, bufsize(p,end), "\tiSource\tmodes");
break;
case SOURCE_ADSB:
p += snprintf(p, bufsize(p,end), "\tiSource\tadsb");
break;
case SOURCE_TISB:
p += snprintf(p, bufsize(p,end), "\tiSource\ttisb");
break;
default:
p += snprintf(p, bufsize(p,end), "\tiSource\tunknown");
break;
}
if (a->callsign_valid.source == SOURCE_TISB) {
used_tisb = 1;
}