Skip to content

Commit ef96560

Browse files
committed
Merge branch 'apxtlm'
2 parents 2292f9d + 101a92e commit ef96560

File tree

337 files changed

+11914
-21275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+11914
-21275
lines changed

.github/workflows/apx-gcs-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
name: Build MacOS
5151
runs-on: macos-latest
5252
env:
53-
VERSION_QT: 6.7.1
53+
VERSION_QT: 6.8.1
5454
VERSION_SDL: 2.30.8
5555
VERSION_GST: 1.22.5
5656

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RUN pip3 install networkx simplejson jinja2 pyyaml
8484
RUN apt install -y --no-install-recommends \
8585
python3-dev && rm -Rf /var/cache/apt
8686

87-
ARG VERSION_QT=6.7.1
87+
ARG VERSION_QT=6.8.1
8888
RUN pip install aqtinstall &&\
8989
aqt install-qt linux$(cat /arch_qt) desktop ${VERSION_QT} -m \
9090
qtshadertools qt5compat qtcharts qtmultimedia \

docs/pages/altnav.md

+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
mermaid: true
3+
---
4+
5+
# Alternative Navigation Devices with APX Autopilot
6+
7+
The UAVOS APX Autopilot system supports integration with various third-party navigation modules, enabling flexible navigation and control capabilities. These external devices can enhance navigation with additional sensor data, assist in position estimation, and even act as the primary navigation source. They can also issue commands to the autopilot to perform specific maneuvers or navigate towards target locations, while the APX Autopilot retains control over safety protocols and core functions.
8+
9+
## System Architecture
10+
11+
The architecture separates responsibilities: the APX Autopilot manages core flight tasks—stabilization, maneuver execution, geofencing, safety protocols, and ground communications, while the third-party navigation module acts primarily as a sensor module. This module provides supplementary data that the APX Autopilot can use for enhanced situational awareness or specific maneuvers.
12+
13+
For example, an alternative navigation module (companion computer) can send high-level commands, such as hovering/loitering at a specific point or drifting with set XY velocities. The APX Autopilot interprets and executes these commands based on Ground Control Station (GCS) permissions and safety protocols, retaining full control over the aircraft’s dynamics and mission-critical functions to ensure reliability and safety.
14+
15+
## Command Interface: Navigation Module to Autopilot
16+
17+
The navigation module communicates with the APX Autopilot via a set of predefined commands defined in a user script uploaded to the APX Autopilot. These commands may include:
18+
19+
- **Maintain Heading**: Hold a specified heading.
20+
- **Circular Path Following**: Follow a circular path with a defined center and radius.
21+
- **Airspeed Control**: Set specific airspeed within safety limits.
22+
- **Bank Angle Hold**: Maintain a fixed bank angle, such as a specific roll.
23+
- **Line Path Following**: Follow a linear path based on a point and azimuth.
24+
25+
This fundamental command set can be extended to meet unique operational needs. All commands adhere to safety protocols managed by the APX Autopilot and GCS operator. The onboard scripting engine also allows custom control loops to run at INS loop frequency (>100Hz), enabling more complex navigation algorithms to be implemented and executed flexibly.
26+
27+
### Safety and Direct Control Limitations
28+
29+
APX Autopilot’s safety features prevent the navigation module from directly accessing control surfaces or flight dynamics. Direct rate control (e.g., roll, pitch, yaw) is generally discouraged for safety reasons, as it may destabilize the flight. While possible, this configuration requires careful consideration and thorough testing to ensure safe operation.
30+
31+
### Autopilot Commands to Navigation Module
32+
33+
The APX Autopilot can also send specific requests to the navigation module, fostering collaborative situational awareness and dynamic mission adaptation. For example, if a visual navigation AI is assisting in finding a landing spot, the APX Autopilot may request the navigation module to search for a suitable landing area within a designated sector or radius, with the navigation module processing the request and reporting back.
34+
35+
This bidirectional communication creates a cohesive framework in which the APX Autopilot and navigation module work in tandem, each leveraging their specialized capabilities for optimized navigation and control.
36+
37+
### Concept Summary
38+
39+
This integration design isolates navigation tasks from core control and safety functions managed by the APX Autopilot. Developers can focus on navigation capabilities without modifying established control algorithms or safety protocols. For instance, a bank angle hold command from the navigation module is subject to geofencing, safety protocols, and GCS approvals before the APX Autopilot adjusts the aircraft’s bank angle.
40+
41+
By integrating alternative navigation devices in this way, APX Autopilot enhances mission versatility and adaptability while preserving the autonomy and safety of the core flight control system.
42+
43+
## Communication Interfaces
44+
45+
The APX Autopilot hardware provides flexible communication interfaces for integrating alternative navigation devices, primarily using serial connections like UART or RS232. These interfaces enable seamless data exchange between the APX Autopilot and the companion computer. The onboard scripting engine processes incoming commands and data, handling protocol logic to support real-time navigation updates and control adjustments.
46+
47+
### Data Exchange with Ground Control Software
48+
49+
The APX Autopilot interfaces with the Ground Control Software (GCS) to receive mission updates, flight plans, and safety commands. The external navigation module can also transmit data to the GCS for real-time monitoring and enhanced situational awareness. When needed, the autopilot manages data delivery between the companion computer and ground station via its existing C2 datalink.
50+
51+
This bidirectional communication ensures that all operators have access to up-to-date information, supporting informed decision-making based on the aircraft’s status and mission progress.
52+
53+
```mermaid
54+
flowchart TB
55+
subgraph c_air[Unmanned Vehicle]
56+
subgraph apx[Autopilot]
57+
58+
subgraph sns[Sensors]
59+
imu[IMU]
60+
cas[Airdata]
61+
gps[GNSS]
62+
end
63+
64+
subgraph nav[Autopilot Core]
65+
est[Estimators]
66+
reg[Regulators]
67+
safety[Safety Procedures]
68+
end
69+
70+
subgraph ctr[Controls]
71+
srv[Servo Actuators]
72+
end
73+
74+
com(C2 Datalink)
75+
scr[Scripting Engine]
76+
77+
sns --> nav --> ctr
78+
79+
end
80+
81+
subgraph pld[Payload]
82+
pc[Companion Computer]
83+
cv[Alternative Navigation Sensors]
84+
ai[AI Algorithms]
85+
end
86+
87+
subgraph pld_rf["Optional Payload Radio link"]
88+
pld_tcp[TCP/IP]
89+
pld_uart[Serial]
90+
video[Video Stream]
91+
end
92+
93+
com <-- C2 data {8} --> pld_uart
94+
pld <-- Payload Ethernet {7} --> pld_tcp
95+
96+
97+
98+
99+
pld <-- serial port {1} --> scr
100+
scr -- "awareness data {2}" --> nav
101+
nav -- "sesnor modes {3}" --> scr
102+
103+
scr <-- payload protocol {4} --> com
104+
end
105+
106+
subgraph c_gnd[Ground Control]
107+
subgraph gcs[Ground Control Station App]
108+
ats(C2 datalink)
109+
plugins[Custom Plugins]
110+
end
111+
112+
subgraph pldop[Payload Operator]
113+
data[Realtime Payload Analysis]
114+
tuning[Payload Parameters Tuning]
115+
end
116+
117+
118+
ats <-- payload protocol {4} --> plugins
119+
end
120+
121+
122+
com <-. radio comm {5} .-> ats
123+
pldop <-. internet {6} .-> plugins
124+
125+
pld_rf <-. High-speed Radio Comm .-> pldop
126+
127+
128+
129+
style c_air stroke-width:2px,stroke-dasharray: 10 10,fill:transparent;
130+
style c_gnd stroke-width:2px,stroke-dasharray: 10 10,fill:transparent;
131+
132+
style apx stroke-width:4px;
133+
style gcs stroke-width:4px;
134+
135+
136+
```
137+
138+
The diagram above illustrates the communication flow between the APX Autopilot, companion computer, and Ground Control Station (GCS):
139+
140+
1. The APX Autopilot receives commands and data from the companion computer via a serial connection, with protocol logic defined in the onboard scripting engine.
141+
2. The scripting engine processes awareness data from the companion computer, updating the autopilot’s navigation and control logic.
142+
3. Based on safety protocols and GCS operator commands, the script can adjust the companion computer’s modes and issue commands, implemented by the onboard scripting engine by the user.
143+
4. The APX Autopilot manages data exchange between the companion computer and GCS, packing and sending data to the GCS via script, where it’s processed by a GCS plugin and forwarded to the payload operator over an internet connection.
144+
5. The APX Autopilot communicates with the GCS over the C2 radio link, transmitting mission updates, telemetry, and safety commands. Payload data packed by the script is also sent via this link.
145+
6. The GCS forwards payload data to the payload operator over an internet connection, enabling real-time payload analysis and parameter tuning. The protocol is defined by the user in the plugin itself, but it is limited by the data sent by the onboard script. Also the plugin can send commands to the onboard script and provide additional data to the payload operator from decoded APX Autopilot telemetry stream.
146+
7. Optionally, the payload operator can connect directly to the payload computer via a high-speed radio link, providing access to payload data and controls.
147+
8. C2 data can be redundantly forwarded to the Ground Control Station via the Optional Payload Radio Link to enhance safety and data integrity. For specific mission requirements, the standard C2 radio link can be omitted in favor of the Optional Payload Radio Link. In this setup, the payload data link must support dual interfaces: a serial connection to the APX Autopilot and an Ethernet connection to the companion computer.

docs/pages/sim.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To get started with **Software in the loop simulation** (no hardware) you can fo
2323
- Select the airport `KSEA`;
2424
- Select runway `RWY - 1 6 L`;
2525
- Choose aircraft `S1B`
26-
- Switch to GCS window, wait until `SIM` vehicle is recognized, select it if needed in the `Vehicle` menu;
27-
- Open the `Vehicle parameters` window and make sure you have updated and uploaded configuration;
26+
- Switch to GCS window, wait until `SIM` unit is recognized, select it if needed in the `Fleet` menu;
27+
- Open `Unit parameters` window and make sure you have updated and uploaded configuration;
2828
- When there is no mission downloaded from vehicle exists - i.e. mission label on the map does not show any mission:
2929
- Press mission button to open dialog, then `Load mission` button, to load applicable mission, then click `Upload` button to sync mission with the vehicle;
3030
- Alternatively, create a new mission and upload to the vehicle;

resources/macos/Info.plist.in

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
<string>public.text</string>
5353
</array>
5454
<key>UTTypeIdentifier</key>
55-
<string>com.uavos.telemetry</string>
55+
<string>com.uavos.apxtlm</string>
5656
<key>UTTypeTagSpecification</key>
5757
<dict>
5858
<key>public.filename-extension</key>
5959
<array>
60-
<string>telemetry</string>
60+
<string>apxtlm</string>
6161
</array>
6262
</dict>
6363
</dict>
@@ -71,12 +71,12 @@
7171
<string>public.text</string>
7272
</array>
7373
<key>UTTypeIdentifier</key>
74-
<string>com.uavos.vehicle</string>
74+
<string>com.uavos.nodes</string>
7575
<key>UTTypeTagSpecification</key>
7676
<dict>
7777
<key>public.filename-extension</key>
7878
<array>
79-
<string>vehicle</string>
79+
<string>nodes</string>
8080
</array>
8181
</dict>
8282
</dict>
@@ -109,8 +109,8 @@
109109
<string>Default</string>
110110
<key>LSItemContentTypes</key>
111111
<array>
112-
<string>com.uavos.telemetry</string>
113-
<string>com.uavos.vehicle</string>
112+
<string>com.uavos.apxtlm</string>
113+
<string>com.uavos.nodes</string>
114114
<string>com.uavos.apxfw</string>
115115
</array>
116116
</dict>

resources/scripts/examples/ApxAts.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222

2323
#include <apx.h>
2424

25-
using m_f1 = Mandala<mandala::est::env::usrf::f1>; //vehicle lat
26-
using m_f2 = Mandala<mandala::est::env::usrf::f2>; //vehicle lon
27-
using m_f3 = Mandala<mandala::est::env::usrf::f3>; //vehicle hmsl
25+
using m_f1 = Mandala<mandala::est::env::usrf::f1>; //unit lat
26+
using m_f2 = Mandala<mandala::est::env::usrf::f2>; //unit lon
27+
using m_f3 = Mandala<mandala::est::env::usrf::f3>; //unit hmsl
2828

2929
using m_ats_mode = Mandala<mandala::cmd::nav::ats::mode>;
3030

3131
static constexpr const port_id_t port_id{5};
3232

33-
float vehicle_pos[3] = {};
33+
float unit_pos[3] = {};
3434
bool new_data = {};
3535

3636
int main()
3737
{
38-
task("on_vehicle_pos", 20); // 50 Hz
38+
task("on_unit_pos", 20); // 50 Hz
3939
receive(port_id, "on_ats");
4040

4141
m_f1();
@@ -47,25 +47,25 @@ int main()
4747
return 0;
4848
}
4949

50-
EXPORT void on_vehicle_pos()
50+
EXPORT void on_unit_pos()
5151
{
5252
if (!new_data) {
5353
return;
5454
}
5555

56-
m_f1::publish(vehicle_pos[0]);
57-
m_f2::publish(vehicle_pos[1]);
58-
m_f3::publish(vehicle_pos[2]);
56+
m_f1::publish(unit_pos[0]);
57+
m_f2::publish(unit_pos[1]);
58+
m_f3::publish(unit_pos[2]);
5959

6060
new_data = false;
6161
}
6262

6363
EXPORT void on_ats(const uint8_t *data, size_t size)
6464
{
65-
if (size != sizeof(vehicle_pos)) {
65+
if (size != sizeof(unit_pos)) {
6666
return;
6767
}
6868

69-
memcpy(vehicle_pos, data, size);
69+
memcpy(unit_pos, data, size);
7070
new_data = true;
71-
}
71+
}

resources/scripts/gcs.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ bound.info = "wrap angle -180..+180";
4545

4646
// system console
4747
function req(n) {
48-
apx.vehicles.current.mandala.fact(n).request();
48+
apx.fleet.current.mandala.fact(n).request();
4949
}
5050
req.info = "request var n from UAV";
5151

5252
function send(n) {
53-
apx.vehicles.current.mandala.fact(n).send();
53+
apx.fleet.current.mandala.fact(n).send();
5454
}
5555
send.info = "send var n to UAV";
5656

5757
function serial(p, v) {
58-
apx.vehicles.current.protocol.data.sendSerial(p, v);
58+
apx.fleet.current.protocol.data.sendSerial(p, v);
5959
}
6060
serial.info = "send data v to serial port ID p";
6161

6262
function vmexec(f) {
63-
apx.vehicles.current.requestScript(f);
63+
apx.fleet.current.requestScript(f);
6464
}
6565
vmexec.info = "execute function of onboard scripts";
6666

@@ -70,14 +70,14 @@ function sleep(n) {
7070
sleep.info = "sleep n milliseconds";
7171

7272
function next() {
73-
apx.vehicles.selectNext();
73+
apx.fleet.selectNext();
7474
}
75-
next.info = "switch to next vehicle";
75+
next.info = "switch to next unit";
7676

7777
function prev() {
78-
apx.vehicles.selectPrev();
78+
apx.fleet.selectPrev();
7979
}
80-
prev.info = "switch to previous vehicle";
80+
prev.info = "switch to previous unit";
8181

8282
// objects tree helper functions
8383
function ls(a, b) {
@@ -135,19 +135,19 @@ function zrc() {
135135
zrc.info = "reset pilot controls";
136136

137137
function flyTo(lat, lon) {
138-
apx.vehicles.current.flyHere(apx.coordinate(lat, lon))
138+
apx.fleet.current.flyHere(apx.coordinate(lat, lon))
139139
}
140140
flyTo.info = "Set commanded position";
141141

142142

143143

144144
function inair(v) {
145-
cmd.ahrs.inair = v;
145+
cmd.ins.inair = v;
146146
}
147147
inair.info = "Set in-air status";
148148

149149
function sh(clist) {
150-
apx.vehicles.current.nodes.shell(clist)
150+
apx.fleet.current.nodes.shell(clist)
151151
}
152152
sh.info = "Node shell commands";
153153

0 commit comments

Comments
 (0)