# lakhmanisahil/medical_drone architecture

> Architecture diagram of the GitHub repository lakhmanisahil/medical_drone, 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/lakhmanisahil/medical_drone
- Repository: https://github.com/lakhmanisahil/medical_drone

## Overview

MeddyBuddy combines operator-facing health-check prompts with autonomous MAVLink flight control and a return-flight handoff. The README describes Gazebo, ArduPilot SITL, and QGroundControl integrations; sampled scripts show the control and GUI subprocess calls, but not simulator configuration or live sensor acquisition. The GUI records completion markers, not measured health values. The STL and media assets support the physical payload and demonstration, rather than runtime processing.

Main entry points: [`scripts/gui.py`](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/gui.py) (MedResQ GUI), [`scripts/takeoff_waypoints.py`](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/takeoff_waypoints.py) (Waypoint mission), [`scripts/rtl.py`](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/rtl.py) (Return mission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight control"]
  node_mission["Waypoint mission"]
  node_return["Return mission<br/>[rtl.py]"]
  node_mavlink{{"MAVLink endpoint"}}
end

subgraph group_medical["Medical interface"]
  node_gui["MedResQ GUI<br/>[gui.py]"]
  node_health["Health prompts<br/>[gui.py]"]
  node_markers["Recorded markers"]
end

subgraph group_hardware["Payload design"]
  node_payload["Medical attachments"]
end

subgraph group_simulation["Simulation and ground control"]
  node_gazebo{{"Gazebo simulation"}}
  node_sitl{{"ArduPilot SITL"}}
  node_qgc["QGroundControl"]
  node_demo["Demo media"]
end

node_operator(("Operator"))

node_operator -->|"opens"| node_gui
node_gui -->|"shows prompts"| node_health
node_health -->|"writes markers"| node_markers
node_gui -->|"launches"| node_return
node_mission -->|"sends commands"| node_mavlink
node_mavlink -->|"returns telemetry"| node_mission
node_return -->|"sends commands"| node_mavlink
node_mavlink -->|"returns telemetry"| node_return
node_mission -->|"launches after landing"| node_gui
node_gazebo -.->|"MAVLink simulation"| node_sitl
node_qgc -.->|"monitors telemetry"| node_mavlink

click node_mission "https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/takeoff_waypoints.py"
click node_return "https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/rtl.py"
click node_gui "https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/gui.py"
click node_health "https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/gui.py"
click node_payload "https://github.com/lakhmanisahil/medical_drone/tree/main/stl"
click node_demo "https://github.com/lakhmanisahil/medical_drone/tree/main/media"

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_mission,node_return,node_mavlink toneBlue
class node_gui,node_health,node_markers toneAmber
class node_payload toneMint
class node_gazebo,node_sitl,node_qgc,node_demo toneRose
class node_operator toneIndigo
```

## Components

### Flight control

- [Waypoint mission](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/takeoff_waypoints.py): `scripts/takeoff_waypoints.py`
- [Return mission](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/rtl.py): `scripts/rtl.py`
- **MAVLink endpoint**

### Medical interface

- [MedResQ GUI](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/gui.py): `scripts/gui.py`
- [Health prompts](https://github.com/lakhmanisahil/medical_drone/blob/main/scripts/gui.py): `scripts/gui.py`
- **Recorded markers**

### Payload design

- [Medical attachments](https://github.com/lakhmanisahil/medical_drone/tree/main/stl): `stl`

### Simulation and ground control

- **Gazebo simulation**
- **ArduPilot SITL**
- **QGroundControl**
- [Demo media](https://github.com/lakhmanisahil/medical_drone/tree/main/media): `media`

### Other components

- **Operator**

## Connections

- Operator → MedResQ GUI: opens
- MedResQ GUI → Health prompts: shows prompts
- Health prompts → Recorded markers: writes markers
- MedResQ GUI → Return mission: launches
- Waypoint mission → MAVLink endpoint: sends commands
- MAVLink endpoint → Waypoint mission: returns telemetry
- Return mission → MAVLink endpoint: sends commands
- MAVLink endpoint → Return mission: returns telemetry
- Waypoint mission → MedResQ GUI: launches after landing
- Gazebo simulation → ArduPilot SITL: MAVLink simulation
- QGroundControl → MAVLink endpoint: monitors telemetry
