# booleansarebinary/amaze-autonomous-drone architecture

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

- Interactive diagram: https://gitdiagram.com/booleansarebinary/amaze-autonomous-drone
- Repository: https://github.com/booleansarebinary/amaze-autonomous-drone

## Overview

This repository is a small Crazyflie drone flight utility. An operator runs its command-line entry point to preview a short flight or connect to the drone and execute a takeoff, forward move, and landing using either MotionCommander or the high-level commander. The motion mode checks for a Flow deck; both modes attempt to arm before flight. The graph focuses on the implemented runtime in algorithms/hop.py; main.py is a separate Hello World stub. The README documents no additional capabilities, and the graph does not infer unsampled integrations.

Main entry points: [`algorithms/hop.py`](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py) (Flight CLI), [`cache`](https://github.com/booleansarebinary/amaze-autonomous-drone/tree/main/cache) (Radio cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Flight command"]
  node_hop["Flight CLI<br/>[hop.py]"]
  node_sequence["Flight preview<br/>[hop.py]"]
end

subgraph group_control["Flight control"]
  node_safety["Deck and arming<br/>[hop.py]"]
  node_motion["Motion mode<br/>[hop.py]"]
  node_hlc["HLC mode<br/>[hop.py]"]
end

subgraph group_hardware["Drone connection"]
  node_session["Crazyflie session<br/>[hop.py]"]
  node_radio["Crazyflie drone"]
  node_cache[("Radio cache")]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_hop
node_hop -->|"prints preview"| node_sequence
node_hop -->|"opens connection"| node_session
node_hop -->|"dispatches motion"| node_motion
node_hop -->|"dispatches HLC"| node_hlc
node_motion -->|"checks and arms"| node_safety
node_hlc -->|"arms"| node_safety
node_session -->|"connects"| node_radio
node_session -->|"configures cache"| node_cache
node_motion -->|"commands via MotionCommander"| node_radio
node_hlc -->|"sends flight commands"| node_radio

click node_hop "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_sequence "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_safety "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_motion "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_hlc "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_session "https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py"
click node_cache "https://github.com/booleansarebinary/amaze-autonomous-drone/tree/main/cache"

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_hop,node_sequence toneBlue
class node_safety,node_motion,node_hlc toneAmber
class node_session,node_radio,node_cache toneMint
class node_operator toneIndigo
```

## Components

### Flight command

- [Flight CLI](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`
- [Flight preview](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`

### Flight control

- [Deck and arming](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`
- [Motion mode](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`
- [HLC mode](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`

### Drone connection

- [Crazyflie session](https://github.com/booleansarebinary/amaze-autonomous-drone/blob/main/algorithms/hop.py): `algorithms/hop.py`
- **Crazyflie drone**
- [Radio cache](https://github.com/booleansarebinary/amaze-autonomous-drone/tree/main/cache): `cache`

### Other components

- **Operator**

## Connections

- Operator → Flight CLI: runs (evidence: `algorithms/hop.py`)
- Flight CLI → Flight preview: prints preview (evidence: `algorithms/hop.py`)
- Flight CLI → Crazyflie session: opens connection (evidence: `algorithms/hop.py`)
- Flight CLI → Motion mode: dispatches motion (evidence: `algorithms/hop.py`)
- Flight CLI → HLC mode: dispatches HLC (evidence: `algorithms/hop.py`)
- Motion mode → Deck and arming: checks and arms (evidence: `algorithms/hop.py`)
- HLC mode → Deck and arming: arms (evidence: `algorithms/hop.py`)
- Crazyflie session → Crazyflie drone: connects (evidence: `algorithms/hop.py`)
- Crazyflie session → Radio cache: configures cache (evidence: `algorithms/hop.py`)
- Motion mode → Crazyflie drone: commands via MotionCommander (evidence: `algorithms/hop.py`)
- HLC mode → Crazyflie drone: sends flight commands (evidence: `algorithms/hop.py`)
