# godkiller0209/uav architecture

> Architecture diagram of the GitHub repository godkiller0209/uav, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/godkiller0209/uav
- Repository: https://github.com/godkiller0209/uav

## Overview

UAV Search and Rescue is a PyQt5 desktop application for mapping search polygons, generating continuous coverage routes, and preparing and operating a UAV mission. The main workflow is: edit areas on the map, generate and save a zigzag route, load and validate that route as a mission, then use the UAV page for telemetry and mission controls. The README documents the map-to-Python generation flow; the sampled code confirms route planning, persistence, mission validation, and MAVSDK-related controls. Map JavaScript and some runtime wiring were not sampled, so those links rely on the README or are omitted.

Main entry points: [`GUI/map_bridge.py`](https://github.com/godkiller0209/uav/blob/main/GUI/map_bridge.py) (Map bridge), [`GUI/main_window.py`](https://github.com/godkiller0209/uav/blob/main/GUI/main_window.py) (Navigation window), [`GUI/uav_page.py`](https://github.com/godkiller0209/uav/blob/main/GUI/uav_page.py) (UAV page), [`drone/drone_client.py`](https://github.com/godkiller0209/uav/blob/main/drone/drone_client.py) (Drone client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_entry["Application entry<br/>[main.py]"]
  node_window["Navigation window<br/>[main_window.py]"]
  node_map_page["Map page<br/>[map_page.py]"]
  node_uav_page["UAV page<br/>[uav_page.py]"]
end

subgraph group_mapping["Map and route planning"]
  node_map_ui["Map interface<br/>[map.js]"]
  node_map_bridge["Map bridge<br/>[map_bridge.py]"]
  node_area_data[("Search areas<br/>[map_bridge.py]")]
  node_coverage["Route coordinator<br/>[coverage_path.py]"]
  node_zigzag["Zigzag planner<br/>[zigzag.py]"]
  node_route_store[("Waypoint store<br/>[waypoint_store.py]")]
end

subgraph group_mission["Mission preparation"]
  node_mission_service["Mission validation and plan<br/>[mission_service.py]"]
end

subgraph group_flight["UAV operations"]
  node_drone_client["Drone client<br/>[drone_client.py]"]
  node_mavsdk{{"MAVSDK / autopilot"}}
end

node_operator(("Operator"))

node_operator -->|"starts"| node_entry
node_entry -->|"opens"| node_window
node_window -->|"hosts"| node_map_page
node_window -->|"hosts"| node_uav_page
node_operator -->|"edits areas"| node_map_ui
node_map_page -->|"registers channel"| node_map_bridge
node_map_ui -->|"sends requests"| node_map_bridge
node_map_bridge -->|"reads and writes"| node_area_data
node_map_bridge -->|"requests route"| node_coverage
node_coverage -->|"dispatches planner"| node_zigzag
node_map_bridge -->|"saves route"| node_route_store
node_map_bridge -->|"publishes route"| node_map_ui
node_uav_page -->|"prepares mission"| node_mission_service
node_uav_page -->|"controls UAV"| node_drone_client
node_drone_client -->|"uses mission logic"| node_mission_service
node_drone_client -.->|"communicates"| node_mavsdk

click node_entry "https://github.com/godkiller0209/uav/blob/main/main.py"
click node_window "https://github.com/godkiller0209/uav/blob/main/GUI/main_window.py"
click node_map_page "https://github.com/godkiller0209/uav/blob/main/GUI/map_page.py"
click node_uav_page "https://github.com/godkiller0209/uav/blob/main/GUI/uav_page.py"
click node_map_ui "https://github.com/godkiller0209/uav/blob/main/assets/map.js"
click node_map_bridge "https://github.com/godkiller0209/uav/blob/main/GUI/map_bridge.py"
click node_area_data "https://github.com/godkiller0209/uav/blob/main/GUI/map_bridge.py"
click node_coverage "https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/coverage_path.py"
click node_zigzag "https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/zigzag.py"
click node_route_store "https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/waypoint_store.py"
click node_mission_service "https://github.com/godkiller0209/uav/blob/main/mission/mission_service.py"
click node_drone_client "https://github.com/godkiller0209/uav/blob/main/drone/drone_client.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_window,node_map_page,node_uav_page toneBlue
class node_map_ui,node_map_bridge,node_area_data,node_coverage,node_zigzag,node_route_store toneAmber
class node_mission_service toneMint
class node_drone_client,node_mavsdk toneRose
class node_operator toneIndigo
```

## Components

### Desktop interface

- [Application entry](https://github.com/godkiller0209/uav/blob/main/main.py): `main.py`
- [Navigation window](https://github.com/godkiller0209/uav/blob/main/GUI/main_window.py): `GUI/main_window.py`
- [Map page](https://github.com/godkiller0209/uav/blob/main/GUI/map_page.py): `GUI/map_page.py`
- [UAV page](https://github.com/godkiller0209/uav/blob/main/GUI/uav_page.py): `GUI/uav_page.py`

### Map and route planning

- [Map interface](https://github.com/godkiller0209/uav/blob/main/assets/map.js): `assets/map.js`
- [Map bridge](https://github.com/godkiller0209/uav/blob/main/GUI/map_bridge.py): `GUI/map_bridge.py`
- [Search areas](https://github.com/godkiller0209/uav/blob/main/GUI/map_bridge.py): `GUI/map_bridge.py`
- [Route coordinator](https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/coverage_path.py): `coverage_path_planning/coverage_path.py`
- [Zigzag planner](https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/zigzag.py): `coverage_path_planning/zigzag.py`
- [Waypoint store](https://github.com/godkiller0209/uav/blob/main/coverage_path_planning/waypoint_store.py): `coverage_path_planning/waypoint_store.py`

### Mission preparation

- [Mission validation and plan](https://github.com/godkiller0209/uav/blob/main/mission/mission_service.py): `mission/mission_service.py`

### UAV operations

- [Drone client](https://github.com/godkiller0209/uav/blob/main/drone/drone_client.py): `drone/drone_client.py`
- **MAVSDK / autopilot**

### Other components

- **Operator**

## Connections

- Operator → Application entry: starts (evidence: `README.md`)
- Application entry → Navigation window: opens (evidence: `main.py`)
- Navigation window → Map page: hosts (evidence: `GUI/main_window.py`)
- Navigation window → UAV page: hosts (evidence: `GUI/main_window.py`)
- Operator → Map interface: edits areas (evidence: `README.md`)
- Map page → Map bridge: registers channel (evidence: `GUI/map_page.py`)
- Map interface → Map bridge: sends requests (evidence: `README.md`)
- Map bridge → Search areas: reads and writes (evidence: `GUI/map_bridge.py`)
- Map bridge → Route coordinator: requests route (evidence: `GUI/map_bridge.py`)
- Route coordinator → Zigzag planner: dispatches planner (evidence: `coverage_path_planning/coverage_path.py`)
- Map bridge → Waypoint store: saves route (evidence: `GUI/map_bridge.py`)
- Map bridge → Map interface: publishes route (evidence: `README.md`)
- UAV page → Mission validation and plan: prepares mission (evidence: `GUI/uav_page.py`)
- UAV page → Drone client: controls UAV (evidence: `GUI/uav_page.py`)
- Drone client → Mission validation and plan: uses mission logic (evidence: `drone/drone_client.py`)
- Drone client → MAVSDK / autopilot: communicates
