Expose modea_hit / modec_hit in aircraft.json

This commit is contained in:
Oliver Jowett 2020-08-24 15:03:17 +08:00
parent fba10d3262
commit 1dbb8ab234
2 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,8 @@ This file contains dump1090's list of recently seen aircraft. The keys are:
* sil_type: interpretation of SIL: unknown, perhour, persample
* gva: Geometric Vertical Accuracy (2.2.3.2.7.2.8)
* sda: System Design Assurance (2.2.3.2.7.2.4.6)
* modea: true if we seem to be also receiving Mode A responses from this aircraft
* modec: true if we seem to be also receiving Mode C responses from this aircraft
* mlat: list of fields derived from MLAT data
* tisb: list of fields derived from TIS-B data
* messages: total number of Mode S messages received from this aircraft

View File

@ -1457,6 +1457,10 @@ char *generateAircraftJson(const char *url_path, int *len) {
p = safe_snprintf(p, end, ",\"gva\":%u", a->gva);
if (trackDataValid(&a->sda_valid))
p = safe_snprintf(p, end, ",\"sda\":%u", a->sda);
if (a->modeA_hit)
p = safe_snprintf(p, end, ",\"modea\":true");
if (a->modeC_hit)
p = safe_snprintf(p, end, ",\"modec\":true");
p = safe_snprintf(p, end, ",\"mlat\":");