4 /* Highlight UAV devices */
5 kismet_ui.AddDeviceRowHighlight({
7 description: "UAV and Drone devices",
9 defaultcolor: "#f49e42",
14 selector: function(data) {
15 return ('uav.device' in data && data['uav.device'] != 0);
19 kismet_ui.AddDeviceDetail("uav", "UAV/Drone", 0, {
20 filter: function(data) {
21 return ('uav.device' in data && data['uav.device'] != 0);
23 draw: function(data, target) {
24 target.devicedata(data, {
28 field: "uav.device/uav.manufacturer",
29 title: "Manufacturer",
30 empty: "<i>Unknown</i>",
31 help: "The UAV manufacturer may be derived from characteristics such as MAC address and SSID, or from embedded data such as the DroneID information.",
34 field: "uav.device/uav.model",
37 help: "The UAV model may be derived from characteristics such as MAC address and SSID, or from embedded data such as the DroneID information.",
40 field: "uav.device/uav.serialnumber",
41 title: "Serial Number",
43 help: "Serial numbers are available from UAV devices which broadcast the DroneID protocol. Currently only DJI devices advertise this protocol.",
46 field: "uav.device/uav.match_type",
48 empty: "<i>Unknown</i>",
49 help: "Kismet can identify a UAV device by several methods; 'WifiMatch' compares the MAC address and SSID. 'DroneID' matches the DJI DroneID protocol added to packets from the device.",
52 field: "home_location",
53 title: "Home Location",
54 render: function(opts) {
56 kismet.ObjectByString(opts['data'], "uav.device/uav.telemetry.home_location/kismet.common.location.geopoint[1]") + ", " +
57 kismet.ObjectByString(opts['data'], "uav.device/uav.telemetry.home_location/kismet.common.location.geopoint[0]");
61 help: "Last advertised <b>home</b> location. The home location is where a UAV will return to if signal is lost or a return-to-home is received.",
64 field: "app_location",
65 title: "App Location",
66 render: function(opts) {
68 kismet.ObjectByString(opts['data'], "uav.device/uav.telemetry.app_location/kismet.common.location.geopoint[1]") + ", " +
69 kismet.ObjectByString(opts['data'], "uav.device/uav.telemetry.app_location/kismet.common.location.geopoint[0]");
73 help: "Last advertised <b>application</b> location. This is the last-known location of the operator application.",
76 field: "uav.device/uav.last_telemetry",
77 groupTitle: "Telemetry",
83 field: "uav.device/uav.last_telemetry/uav.telemetry.motor_on",
85 render: function(opts) {
90 empty: "<i>Unknown</i>",
91 help: "The UAV device advertised that the props are currently on",
94 field: "uav.device/uav.last_telemetry/uav.telemetry.airborne",
96 render: function(opts) {
101 empty: "<i>Unknown</i>",
102 help: "The UAV device advertised that it is airborne",
105 field: "uav_location",
106 title: "Last Location",
107 render: function(opts) {
109 kismet.ObjectByString(opts['data'], "uav.device/uav.last_telemetry/uav.telemetry.location/kismet.common.location.geopoint[1]") + ", " +
110 kismet.ObjectByString(opts['data'], "uav.device/uav.last_telemetry/uav.telemetry.location/kismet.common.location.geopoint[0]");
114 help: "Last advertised location",
117 field: "uav.device/uav.last_telemetry/uav.telemetry.location/kismet.common.location.alt",
119 help: "Last advertised altitude",
120 filter: function(opts) {
121 return (kismet.ObjectByString(opts['data'], "uav.device/uav.last_telemetry/uav.telemetry.location/kismet.common.location.fix") >= 3);
123 render: function(opts) {
124 console.log(opts['value']);
125 return kismet_ui.renderHeightDistance(opts['value']);
129 field: "uav.device/uav.last_telemetry/uav.telemetry.height",
131 render: function(opts) {
132 console.log(opts['value']);
133 return kismet_ui.renderHeightDistance(opts['value']);
135 help: "Advertised height above ground",