# sarreola07/venator architecture

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

- Interactive diagram: https://gitdiagram.com/sarreola07/venator
- Repository: https://github.com/sarreola07/venator

## Overview

Venator is an off-grid drone command-and-control system. Its principal workflow is a laptop operator using the ground client to send mission and waypoint commands over LoRa; the Jetson C2 server validates commands, runs flight behavior through the Pixhawk, and returns status and results over the link. The repository also includes interactive bench missions, camera telemetry, preflight checks, link authentication, and a separate phone-to-phone relay. Edges reflect README statements and shown source references; unsampled subsystems are represented without speculative internal connections.

Main entry points: [`radio/serial_link.py`](https://github.com/sarreola07/venator/blob/main/radio/serial_link.py) (LoRa serial link), [`drone/c2_server.py`](https://github.com/sarreola07/venator/blob/main/drone/c2_server.py) (C2 server), [`drone/missions.py`](https://github.com/sarreola07/venator/blob/main/drone/missions.py) (Bench missions), [`ground/gcs_client.py`](https://github.com/sarreola07/venator/blob/main/ground/gcs_client.py) (Ground client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operator["Ground operation"]
  node_gcs["Ground client<br/>[gcs_client.py]"]
end

subgraph group_aircraft["Aircraft control"]
  node_c2["C2 server<br/>[c2_server.py]"]
  node_missions["Bench missions<br/>[missions.py]"]
end

subgraph group_radio["Radio link"]
  node_protocol["C2 protocol<br/>[protocol.py]"]
  node_serial["LoRa serial link<br/>[serial_link.py]"]
  node_auth["Message authentication<br/>[auth.py]"]
  node_relay["Phone relay<br/>[phone_relay.py]"]
end

subgraph group_support["Camera and checks"]
  node_camera["Camera publisher"]
  node_checks["Pixhawk check<br/>[check_pixhawk.py]"]
  node_rc["RC check<br/>[check_rc.py]"]
  node_preflight["Preflight audit<br/>[preflight_audit.py]"]
end

node_pilot(("Laptop operator"))
node_pixhawk{{"Pixhawk flight controller"}}
node_lora{{"LoRa radios"}}
node_phone(("Phone user"))
node_oak{{"OAK-D camera"}}
node_browser(("Laptop browser"))

node_pilot -->|"operates"| node_gcs
node_gcs -->|"encodes commands"| node_protocol
node_gcs -->|"sends messages"| node_serial
node_serial -->|"encodes lines"| node_protocol
node_serial -->|"signs messages"| node_auth
node_lora -.->|"carries packets"| node_serial
node_c2 -->|"receives commands"| node_serial
node_c2 -->|"dispatches messages"| node_protocol
node_c2 -->|"runs missions"| node_missions
node_missions -->|"controls flight"| node_pixhawk
node_c2 -->|"reads telemetry"| node_pixhawk
node_oak -->|"provides images"| node_camera
node_camera -->|"streams coordinates"| node_missions
node_camera -->|"serves video"| node_browser
node_missions -->|"checks flight state"| node_pixhawk
node_phone -->|"sends text"| node_relay
node_relay -.->|"uses radio link"| node_serial
node_checks -.->|"checks controller"| node_pixhawk
node_rc -->|"reads RC state"| node_pixhawk
node_preflight -.->|"audits readiness"| node_pixhawk

click node_gcs "https://github.com/sarreola07/venator/blob/main/ground/gcs_client.py"
click node_c2 "https://github.com/sarreola07/venator/blob/main/drone/c2_server.py"
click node_missions "https://github.com/sarreola07/venator/blob/main/drone/missions.py"
click node_protocol "https://github.com/sarreola07/venator/blob/main/radio/protocol.py"
click node_serial "https://github.com/sarreola07/venator/blob/main/radio/serial_link.py"
click node_auth "https://github.com/sarreola07/venator/blob/main/radio/auth.py"
click node_relay "https://github.com/sarreola07/venator/blob/main/radio/phone_relay.py"
click node_camera "https://github.com/sarreola07/venator/blob/main/drone/camera_publisher.py"
click node_checks "https://github.com/sarreola07/venator/blob/main/drone/checks/check_pixhawk.py"
click node_rc "https://github.com/sarreola07/venator/blob/main/drone/checks/check_rc.py"
click node_preflight "https://github.com/sarreola07/venator/blob/main/drone/checks/preflight_audit.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_gcs,node_phone,node_browser toneBlue
class node_c2,node_missions toneAmber
class node_protocol,node_serial,node_auth,node_relay toneMint
class node_camera,node_checks,node_rc,node_preflight toneRose
class node_pilot,node_pixhawk,node_lora,node_oak toneIndigo
```

## Components

### Ground operation

- [Ground client](https://github.com/sarreola07/venator/blob/main/ground/gcs_client.py): `ground/gcs_client.py`

### Aircraft control

- [C2 server](https://github.com/sarreola07/venator/blob/main/drone/c2_server.py): `drone/c2_server.py`
- [Bench missions](https://github.com/sarreola07/venator/blob/main/drone/missions.py): `drone/missions.py`

### Radio link

- [C2 protocol](https://github.com/sarreola07/venator/blob/main/radio/protocol.py): `radio/protocol.py`
- [LoRa serial link](https://github.com/sarreola07/venator/blob/main/radio/serial_link.py): `radio/serial_link.py`
- [Message authentication](https://github.com/sarreola07/venator/blob/main/radio/auth.py): `radio/auth.py`
- [Phone relay](https://github.com/sarreola07/venator/blob/main/radio/phone_relay.py): `radio/phone_relay.py`

### Camera and checks

- [Camera publisher](https://github.com/sarreola07/venator/blob/main/drone/camera_publisher.py): `drone/camera_publisher.py`
- [Pixhawk check](https://github.com/sarreola07/venator/blob/main/drone/checks/check_pixhawk.py): `drone/checks/check_pixhawk.py`
- [RC check](https://github.com/sarreola07/venator/blob/main/drone/checks/check_rc.py): `drone/checks/check_rc.py`
- [Preflight audit](https://github.com/sarreola07/venator/blob/main/drone/checks/preflight_audit.py): `drone/checks/preflight_audit.py`

### Other components

- **Laptop operator**
- **Pixhawk flight controller**
- **LoRa radios**
- **Phone user**
- **OAK-D camera**
- **Laptop browser**

## Connections

- Laptop operator → Ground client: operates (evidence: `README.md`)
- Ground client → C2 protocol: encodes commands (evidence: `ground/gcs_client.py`)
- Ground client → LoRa serial link: sends messages (evidence: `ground/gcs_client.py`)
- LoRa serial link → C2 protocol: encodes lines (evidence: `radio/serial_link.py`)
- LoRa serial link → Message authentication: signs messages (evidence: `radio/serial_link.py`)
- LoRa radios → LoRa serial link: carries packets
- C2 server → LoRa serial link: receives commands (evidence: `drone/c2_server.py`)
- C2 server → C2 protocol: dispatches messages (evidence: `drone/c2_server.py`)
- C2 server → Bench missions: runs missions (evidence: `drone/c2_server.py`)
- Bench missions → Pixhawk flight controller: controls flight (evidence: `README.md`)
- C2 server → Pixhawk flight controller: reads telemetry (evidence: `drone/c2_server.py`)
- OAK-D camera → Camera publisher: provides images (evidence: `README.md`)
- Camera publisher → Bench missions: streams coordinates (evidence: `README.md`)
- Camera publisher → Laptop browser: serves video (evidence: `README.md`)
- Bench missions → Pixhawk flight controller: checks flight state (evidence: `drone/missions.py`)
- Phone user → Phone relay: sends text (evidence: `radio/phone_relay.py`)
- Phone relay → LoRa serial link: uses radio link
- Pixhawk check → Pixhawk flight controller: checks controller
- RC check → Pixhawk flight controller: reads RC state (evidence: `drone/checks/check_rc.py`)
- Preflight audit → Pixhawk flight controller: audits readiness
