6import QGroundControl.Controls
8/// Marker for displaying an ADS-B vehicle location on the map
13 property double altitude: Number.NaN ///< NAN to not show
14 property string callsign: "" ///< Vehicle callsign
15 property double heading: Number.NaN ///< Vehicle heading, NAN for none
16 property real size: ScreenTools.defaultFontPixelHeight * 3
17 property bool alert: false ///< Collision alert
19 anchorPoint.x: vehicleItem.width / 2
20 anchorPoint.y: vehicleItem.height / 2
21 visible: coordinate.isValid
25 width: vehicleIcon.width
26 height: vehicleIcon.height
30 source: alert ? "/qmlimages/AlertAircraft.svg" : "/qmlimages/AwarenessAircraft.svg"
33 sourceSize.width: _root.size
34 fillMode: Image.PreserveAspectFit
36 origin.x: vehicleIcon.width / 2
37 origin.y: vehicleIcon.height / 2
38 angle: isNaN(heading) ? 0 : heading
43 anchors.top: parent.bottom
44 anchors.horizontalCenter: parent.horizontalCenter
46 font.pointSize: ScreenTools.defaultFontPointSize
47 visible: !isNaN(altitude)
48 text: visible ? QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnitsString(altitude, 0) + "\n" + callsign : ""