Decode aircraft category, export in aircraft.json.

Closes #2.
This commit is contained in:
Oliver Jowett 2015-02-22 12:15:26 +00:00
parent 8fabfcb94f
commit 8f3be2cd79
5 changed files with 16 additions and 2 deletions

View file

@ -787,6 +787,8 @@ char *generateAircraftJson(const char *url_path, int *len) {
p += snprintf(p, end-p, ",\"track\":%d", a->track);
if (a->bFlags & MODES_ACFLAGS_SPEED_VALID)
p += snprintf(p, end-p, ",\"speed\":%d", a->speed);
if (a->bFlags & MODES_ACFLAGS_CATEGORY_VALID)
p += snprintf(p, end-p, ",\"category\":\"%02X\"", a->category);
p += snprintf(p, end-p, ",\"messages\":%ld,\"seen\":%.1f,\"rssi\":%.1f}",
a->messages, (now - a->seen)/1000.0,