# run2go/dronecontroller architecture

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

- Interactive diagram: https://gitdiagram.com/run2go/dronecontroller
- Repository: https://github.com/run2go/dronecontroller

## Overview

DroneController is a Second Life HUD-driven drone controller. The documented workflow is to enable the controller, aim and trigger target detection, then manage drones and their formation through HUD controls; drones update their positions in the simulator. Only the README and file tree are available, so the graph reflects documented behavior and omits uncertain script-to-script messaging details.

Main entry points: [`DroneController.lsl`](https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl) (HUD control and fleet management), [`Drone.lsl`](https://github.com/run2go/dronecontroller/blob/main/Drone.lsl) (Drone position updates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_controller["HUD controller"]
  node_controller_script["HUD control and fleet management"]
  node_target_detection["Target detection"]
  node_formation["Resting formation"]
end

subgraph group_drone["Drone runtime"]
  node_drone_script["Drone position updates<br/>[Drone.lsl]"]
end

node_owner(("HUD wearer"))
node_simulator["Second Life world"]

node_owner -->|"toggles and controls"| node_controller_script
node_owner -->|"aims and triggers"| node_target_detection
node_target_detection -->|"raycasts for target"| node_simulator
node_simulator -->|"provides hit data"| node_target_detection
node_controller_script -->|"rezzes and removes drones"| node_simulator
node_controller_script -->|"sets formation parameters"| node_formation
node_drone_script -->|"updates position"| node_simulator
node_controller_script -->|"displays target status"| node_owner

click node_controller_script "https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl"
click node_target_detection "https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl"
click node_formation "https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl"
click node_drone_script "https://github.com/run2go/dronecontroller/blob/main/Drone.lsl"

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_script,node_target_detection,node_formation toneBlue
class node_drone_script toneAmber
class node_owner,node_simulator toneIndigo
```

## Components

### HUD controller

- [HUD control and fleet management](https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl): `DroneController.lsl`
- [Target detection](https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl): `DroneController.lsl`
- [Resting formation](https://github.com/run2go/dronecontroller/blob/main/DroneController.lsl): `DroneController.lsl`

### Drone runtime

- [Drone position updates](https://github.com/run2go/dronecontroller/blob/main/Drone.lsl): `Drone.lsl`

### Other components

- **HUD wearer**
- **Second Life world**

## Connections

- HUD wearer → HUD control and fleet management: toggles and controls
- HUD wearer → Target detection: aims and triggers
- Target detection → Second Life world: raycasts for target
- Second Life world → Target detection: provides hit data
- HUD control and fleet management → Second Life world: rezzes and removes drones
- HUD control and fleet management → Resting formation: sets formation parameters
- Drone position updates → Second Life world: updates position
- HUD control and fleet management → HUD wearer: displays target status
