Use the json type field to show finer-grained datasource info in the table mode.
This commit is contained in:
parent
74ca8b838b
commit
78f88c6f8a
|
@ -201,8 +201,18 @@ function format_data_source(source) {
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case 'mlat':
|
case 'mlat':
|
||||||
return "MLAT";
|
return "MLAT";
|
||||||
case 'adsb':
|
case 'adsb_icao':
|
||||||
|
case 'adsb_other':
|
||||||
return "ADS-B";
|
return "ADS-B";
|
||||||
|
case 'adsb_icao_nt':
|
||||||
|
return "ADS-B (non transponder)";
|
||||||
|
case 'adsr_icao':
|
||||||
|
case 'adsr_other':
|
||||||
|
return "ADS-R";
|
||||||
|
case 'tisb_icao':
|
||||||
|
case 'tisb_trackfile':
|
||||||
|
case 'tisb_other':
|
||||||
|
return "TIS-B";
|
||||||
case 'mode_s':
|
case 'mode_s':
|
||||||
return "Mode S";
|
return "Mode S";
|
||||||
case 'mode_ac':
|
case 'mode_ac':
|
||||||
|
|
|
@ -218,9 +218,9 @@ PlaneObject.prototype.getDataSource = function() {
|
||||||
return 'mlat';
|
return 'mlat';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not MLAT, but position reported - ADSB
|
// Not MLAT, but position reported - ADSB or variants
|
||||||
if (this.position !== null) {
|
if (this.position !== null) {
|
||||||
return 'adsb';
|
return this.addrtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise Mode S
|
// Otherwise Mode S
|
||||||
|
@ -395,6 +395,11 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
||||||
this.rssi = data.rssi;
|
this.rssi = data.rssi;
|
||||||
this.last_message_time = receiver_timestamp - data.seen;
|
this.last_message_time = receiver_timestamp - data.seen;
|
||||||
|
|
||||||
|
if (typeof data.type !== "undefined")
|
||||||
|
this.addrtype = data.type;
|
||||||
|
else
|
||||||
|
this.addrtype = 'adsb_icao';
|
||||||
|
|
||||||
if (typeof data.altitude !== "undefined")
|
if (typeof data.altitude !== "undefined")
|
||||||
this.altitude = data.altitude;
|
this.altitude = data.altitude;
|
||||||
if (typeof data.vert_rate !== "undefined")
|
if (typeof data.vert_rate !== "undefined")
|
||||||
|
|
Loading…
Reference in a new issue