4/// A simple model of the vehicle for the calibration stage. The top is blue, the underside grey and the nose orange so the
5/// side it is on can be told at a glance. The vehicle's nose points along -z and its right wing along +x.
9 /// "multiRotor", "fixedWing", "vtol", "rover" or anything else for a flat board
10 property string kind: "board"
12 /// Half the size of the box around the model along x, y and z
13 readonly property var halfSize: {
27 readonly property color _top: "#3b82f6"
28 readonly property color _under: "#8a8f98"
29 readonly property color _nose: "#f59e0b"
30 readonly property color _dark: "#374151"
31 readonly property color _spinning: Qt.rgba(0.8, 0.85, 0.95, 0.45)
33 component Part: Model {
34 property color tint: root._top
35 property bool glass: false
37 materials: PrincipledMaterial {
40 alphaMode: glass ? PrincipledMaterial.Blend : PrincipledMaterial.Opaque
45 visible: root.kind === "multiRotor"
47 Part { source: "#Cube"; position: Qt.vector3d(0, 3, 0); scale: Qt.vector3d(0.6, 0.1, 0.6) }
48 Part { source: "#Cube"; position: Qt.vector3d(0, -5, 0); scale: Qt.vector3d(0.6, 0.06, 0.6); tint: root._under }
49 Part { source: "#Cube"; position: Qt.vector3d(0, 3, -38); scale: Qt.vector3d(0.22, 0.1, 0.14); tint: root._nose }
50 Part { source: "#Cube"; position: Qt.vector3d(0, 0, 0); eulerRotation.y: 45; scale: Qt.vector3d(1.9, 0.06, 0.1); tint: root._under }
51 Part { source: "#Cube"; position: Qt.vector3d(0, 0, 0); eulerRotation.y: -45; scale: Qt.vector3d(1.9, 0.06, 0.1); tint: root._under }
57 required property int index
58 position: Qt.vector3d((index & 1 ? 1 : -1) * 67, 4, (index & 2 ? 1 : -1) * 67)
60 Part { source: "#Cylinder"; scale: Qt.vector3d(0.36, 0.16, 0.36); tint: root._dark }
61 Part { source: "#Cylinder"; position: Qt.vector3d(0, 9, 0); scale: Qt.vector3d(0.9, 0.01, 0.9); tint: root._spinning; glass: true }
67 visible: root.kind === "fixedWing" || root.kind === "vtol"
69 Part { source: "#Cylinder"; eulerRotation.x: 90; scale: Qt.vector3d(0.28, 2, 0.28) }
70 Part { source: "#Sphere"; position: Qt.vector3d(0, 0, -100); scale: Qt.vector3d(0.28, 0.28, 0.28); tint: root._nose }
71 Part { source: "#Cube"; position: Qt.vector3d(0, 2, -10); scale: Qt.vector3d(2.2, 0.04, 0.4) }
72 Part { source: "#Cube"; position: Qt.vector3d(0, -1, -10); scale: Qt.vector3d(2.2, 0.02, 0.4); tint: root._under }
73 Part { source: "#Cube"; position: Qt.vector3d(0, 2, 90); scale: Qt.vector3d(0.8, 0.03, 0.22) }
74 Part { source: "#Cube"; position: Qt.vector3d(0, 10, 92); scale: Qt.vector3d(0.03, 0.2, 0.26) }
78 visible: root.kind === "vtol"
84 required property int index
85 position: Qt.vector3d((index === 0 ? -1 : 1) * 50, 0, 20)
87 Part { source: "#Cube"; scale: Qt.vector3d(0.06, 0.05, 1.5); tint: root._under }
88 Part { source: "#Cylinder"; position: Qt.vector3d(0, 6, -75); scale: Qt.vector3d(0.56, 0.01, 0.56); tint: root._spinning; glass: true }
89 Part { source: "#Cylinder"; position: Qt.vector3d(0, 6, 75); scale: Qt.vector3d(0.56, 0.01, 0.56); tint: root._spinning; glass: true }
95 visible: root.kind === "rover"
98 Part { source: "#Cube"; position: Qt.vector3d(0, 6, 0); scale: Qt.vector3d(0.9, 0.1, 1.6) }
99 Part { source: "#Cube"; position: Qt.vector3d(0, -4, 0); scale: Qt.vector3d(0.9, 0.12, 1.6); tint: root._under }
100 Part { source: "#Cube"; position: Qt.vector3d(0, 2, -82); scale: Qt.vector3d(0.5, 0.12, 0.04); tint: root._nose }
106 required property int index
109 position: Qt.vector3d((index & 1 ? 1 : -1) * 52, -6, (index & 2 ? 1 : -1) * 55)
110 scale: Qt.vector3d(0.44, 0.14, 0.44)
117 visible: root.kind !== "multiRotor" && root.kind !== "fixedWing" && root.kind !== "vtol" && root.kind !== "rover"
119 Part { source: "#Cube"; position: Qt.vector3d(0, 2, 0); scale: Qt.vector3d(1.2, 0.06, 0.8) }
120 Part { source: "#Cube"; position: Qt.vector3d(0, -3, 0); scale: Qt.vector3d(1.2, 0.04, 0.8); tint: root._under }
121 Part { source: "#Cube"; position: Qt.vector3d(0, 6, 4); scale: Qt.vector3d(0.3, 0.05, 0.3); tint: root._dark }
122 Part { source: "#Cube"; position: Qt.vector3d(0, 3, -34); scale: Qt.vector3d(0.3, 0.04, 0.1); tint: root._nose }