# lolnocow/plane architecture

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

- Interactive diagram: https://gitdiagram.com/lolnocow/plane
- Repository: https://github.com/lolnocow/plane

## Overview

This is a DIY RC-plane project with separate Arduino sketches for the controller, aircraft, and simulator controller, plus a Processing monitor and Python tools. The clearest runtime workflow shown is the Python simulator bridge: it receives UDP control packets, converts their values, and updates a virtual gamepad. The video viewer handles a drone video stream and offers viewing and recording options. The README identifies these tools and their intended environments, but does not document how the Arduino components communicate. Several sketch implementations were not sampled, so their internal links are omitted.

Main entry points: [`simulator controller.py`](https://github.com/lolnocow/plane/blob/main/simulator%20controller.py) (UDP gamepad bridge), [`drone_viewer.py`](https://github.com/lolnocow/plane/blob/main/drone_viewer.py) (Stream reception), [`simulator controller/simulator controller.ino`](https://github.com/lolnocow/plane/blob/main/simulator%20controller/simulator%20controller.ino) (Simulator firmware), [`controller/controller.ino`](https://github.com/lolnocow/plane/blob/main/controller/controller.ino) (Plane controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight hardware"]
  node_controller["Plane controller<br/>[controller.ino]"]
  node_aircraft["Plane firmware<br/>[plane.ino]"]
end

subgraph group_sim["Simulator"]
  node_sim_firmware["Simulator firmware"]
  node_sim_bridge["UDP gamepad bridge"]
end

subgraph group_video["Video viewer"]
  node_stream["Stream reception<br/>[drone_viewer.py]"]
  node_viewer["Video display and recording<br/>[drone_viewer.py]"]
end

subgraph group_monitoring["Monitoring"]
  node_monitor["Processing monitor<br/>[monitor.pde]"]
end

node_pilot(("RC pilot"))
node_gamepad["Virtual gamepad"]
node_drone["Drone video source"]

node_drone -->|"sends video"| node_stream
node_stream -->|"provides frames"| node_viewer
node_pilot -.-> node_controller
node_sim_firmware -.->|"sends UDP"| node_sim_bridge
node_sim_bridge -->|"updates controls"| node_gamepad

click node_controller "https://github.com/lolnocow/plane/blob/main/controller/controller.ino"
click node_aircraft "https://github.com/lolnocow/plane/blob/main/plane/plane.ino"
click node_sim_firmware "https://github.com/lolnocow/plane/blob/main/simulator%20controller/simulator%20controller.ino"
click node_sim_bridge "https://github.com/lolnocow/plane/blob/main/simulator%20controller.py"
click node_stream "https://github.com/lolnocow/plane/blob/main/drone_viewer.py"
click node_viewer "https://github.com/lolnocow/plane/blob/main/drone_viewer.py"
click node_monitor "https://github.com/lolnocow/plane/blob/main/monitor/monitor.pde"

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_controller,node_aircraft toneBlue
class node_sim_firmware,node_sim_bridge toneAmber
class node_stream,node_viewer toneMint
class node_monitor toneRose
class node_pilot,node_gamepad,node_drone toneIndigo
```

## Components

### Flight hardware

- [Plane controller](https://github.com/lolnocow/plane/blob/main/controller/controller.ino): `controller/controller.ino`
- [Plane firmware](https://github.com/lolnocow/plane/blob/main/plane/plane.ino): `plane/plane.ino`

### Simulator

- [Simulator firmware](https://github.com/lolnocow/plane/blob/main/simulator%20controller/simulator%20controller.ino): `simulator controller/simulator controller.ino`
- [UDP gamepad bridge](https://github.com/lolnocow/plane/blob/main/simulator%20controller.py): `simulator controller.py`

### Video viewer

- [Stream reception](https://github.com/lolnocow/plane/blob/main/drone_viewer.py): `drone_viewer.py`
- [Video display and recording](https://github.com/lolnocow/plane/blob/main/drone_viewer.py): `drone_viewer.py`

### Monitoring

- [Processing monitor](https://github.com/lolnocow/plane/blob/main/monitor/monitor.pde): `monitor/monitor.pde`

### Other components

- **RC pilot**
- **Virtual gamepad**
- **Drone video source**

## Connections

- Drone video source → Stream reception: sends video (evidence: `drone_viewer.py`)
- Stream reception → Video display and recording: provides frames (evidence: `drone_viewer.py`)
- RC pilot → Plane controller
- Simulator firmware → UDP gamepad bridge: sends UDP
- UDP gamepad bridge → Virtual gamepad: updates controls (evidence: `simulator controller.py`)
