Use the json type field to show finer-grained datasource info in the table mode.

This commit is contained in:
Oliver Jowett 2016-10-14 21:52:04 +01:00
parent 74ca8b838b
commit 78f88c6f8a
2 changed files with 18 additions and 3 deletions

View file

@ -201,8 +201,18 @@ function format_data_source(source) {
switch (source) {
case 'mlat':
return "MLAT";
case 'adsb':
case 'adsb_icao':
case 'adsb_other':
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':
return "Mode S";
case 'mode_ac':

View file

@ -218,9 +218,9 @@ PlaneObject.prototype.getDataSource = function() {
return 'mlat';
}
// Not MLAT, but position reported - ADSB
// Not MLAT, but position reported - ADSB or variants
if (this.position !== null) {
return 'adsb';
return this.addrtype;
}
// Otherwise Mode S
@ -395,6 +395,11 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
this.rssi = data.rssi;
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")
this.altitude = data.altitude;
if (typeof data.vert_rate !== "undefined")