Tweaks to json output / webmap handling of new fields (untested)
This commit is contained in:
parent
d8f568e0ce
commit
213d769bf9
4 changed files with 62 additions and 25 deletions
4
net_io.c
4
net_io.c
|
|
@ -1304,10 +1304,10 @@ char *generateAircraftJson(const char *url_path, int *len) {
|
|||
if (trackDataValid(&a->callsign_valid))
|
||||
p = safe_snprintf(p, end, ",\"flight\":\"%s\"", jsonEscapeString(a->callsign));
|
||||
if (trackDataValid(&a->airground_valid) && a->airground_valid.source >= SOURCE_MODE_S_CHECKED && a->airground == AG_GROUND)
|
||||
p = safe_snprintf(p, end, ",\"altitude\":\"ground\"");
|
||||
p = safe_snprintf(p, end, ",\"alt_baro\":\"ground\"");
|
||||
else {
|
||||
if (trackDataValid(&a->altitude_baro_valid))
|
||||
p = safe_snprintf(p, end, ",\"altitude\":%d", a->altitude_baro);
|
||||
p = safe_snprintf(p, end, ",\"alt_baro\":%d", a->altitude_baro);
|
||||
if (trackDataValid(&a->altitude_geom_valid))
|
||||
p = safe_snprintf(p, end, ",\"alt_geom\":%d", a->altitude_geom);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue