4 var local_uri_prefix = "";
5 if (typeof(KISMET_URI_PREFIX) !== 'undefined')
6 local_uri_prefix = KISMET_URI_PREFIX;
8 /* Highlight ADSB devices */
9 kismet_ui.AddDeviceRowHighlight({
10 name: "ADSB Government",
11 description: "Government & related ADSB-tagged vehicles",
13 //defaultcolor: "#efe0c3",
14 defaultcolor: "#ffb3b3",
17 'kismet.device.base.phyname',
20 selector: function(data) {
45 'acf181', 'a980fa', 'a7fb8f', 'ae4bd7', 'a47604',
46 'a03bc8', 'a0b8d6', 'a0d9f2', 'a12d51', 'a15f1d',
47 'a169d7', 'a16c6d', 'a193c1', 'a32524', 'a328db',
48 'a32c92', 'a33049', 'a33dc3', 'a3c1be', 'a3c92c',
49 'a3e6e3', 'a3e6e4', 'a410bc', 'a4182a', 'a44360',
50 'a4724d', 'a483df', 'a4bc36', 'a4bfed', 'a51a10',
51 'a51dc7', 'a54b56', 'a54f0d', 'a552c4', 'a5ed09',
52 'a5f9f7', 'a64217', 'a645ce', 'a64985', 'a64d3c',
53 'a654aa', 'aac551', 'abaf9c', 'ac742b', 'ac7b99',
56 if (data['kismet.device.base.phyname'] === 'ADSB') {
57 for (var re of aircraft_info) {
59 if (data['adsb.device']['kismet.adsb.icao_record']['adsb.icao.owner'].toLowerCase().includes(re)) {
61 for (var excld of exclude_list) {
62 if (data['adsb.device']['kismet.adsb.icao_record']['adsb.icao.owner'].toLowerCase().includes(excld)) {
68 if (Boolean(retval)) {
72 for (var re of icao_list) {
73 if (data['adsb.device']['adsb.device.icao'].toLowerCase().includes(re))
81 kismet_ui.AddDeviceDetail("adsb", "ADSB (SDR)", 0, {
82 filter: function(data) {
83 return (data['kismet.device.base.phyname'] === "ADSB");
85 draw: function(data, target) {
86 target.devicedata(data, {
90 field: "adsb.device/adsb.device.icao",
93 empty: "<i>Unknown</i>"
96 field: "adsb.device/adsb.device.callsign",
101 help: "Flight registration / Callsign",
104 field: "adsb.device/adsb.device.callsign",
107 title: "Flightaware",
110 draw: function(opts) {
111 return '<a href="https://flightaware.com/live/flight/' + opts['value'] + '" target="_new">Track ' + opts['value'] + ' on FlightAware</a>';
115 field: "adsb.device/kismet.adsb.icao_record/adsb.icao.regid",
117 title: "Registration ID",
120 help: "Aircraft registration ID or tail number",
123 field: "adsb.device/kismet.adsb.icao_record/adsb.icao.atype",
125 title: "Aircraft Classification",
128 help: "Aircraft classification type",
131 field: "adsb.device/kismet.adsb.icao_record/adsb.icao.model",
136 help: "Aircraft model (general model type)",
139 field: "adsb.device/kismet.adsb.icao_record/adsb.icao.type",
144 help: "Aircraft type (specific model type)",
147 field: "adsb.device/kismet.adsb.icao_record/adsb.icao.owner",
149 title: "Aircraft Operator",
152 help: "Aircraft operator or owner of record",
155 field: "adsb.device/adsb.device.altitude",
161 field: "adsb.device/adsb.device.speed",
167 field: "adsb.device/adsb.device.heading",
171 draw: function(opts) {
173 return Math.round(opts['value']) + '° <i class="fa fa-plane" style="transform: rotate(' + (opts['value'] -45) + 'deg)" />';
178 field: "adsb.device/adsb.device.latitude",
183 draw: function(opts) {
185 return opts['data']['adsb.device']['adsb.device.latitude'] + ', ' + opts['data']['adsb.device']['adsb.device.longitude'] + ' <a target="_new" href="https://openstreetmap.org/?&mlat=' + opts['data']['adsb.device']['adsb.device.latitude'] + '&mlon=' + opts['data']['adsb.device']['adsb.device.longitude'] + '">View on Open Street Maps</a>';
193 field: "adsb.device/adsb.device.asgs",
195 title: "Airspeed(AS) / Groundspeed (GS)",
203 kismet_ui_tabpane.AddTab({
205 tabTitle: 'ADSB Live',
207 createCallback: function(div) {
208 var url = new URL(parent.document.URL);
209 url.searchParams.append('parent_url', url.origin)
210 url.searchParams.append('local_uri_prefix', local_uri_prefix);
211 url.searchParams.append('KISMET_PROXY_PREFIX', KISMET_PROXY_PREFIX);
212 url.pathname = `${local_uri_prefix}${KISMET_PROXY_PREFIX}adsb_map_panel.html`;