# sithumpramu/firefighter-communication-and-management-sys architecture

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

- Interactive diagram: https://gitdiagram.com/sithumpramu/firefighter-communication-and-management-sys
- Repository: https://github.com/sithumpramu/firefighter-communication-and-management-sys

## Overview

This is a firefighter safety telemetry system: wearable nodes gather environmental and GPS data, transmit it to a Raspberry Pi station, and present unit status and locations to operators. The principal workflow runs from sensor sampling through field firmware and LoRa reception to serial parsing, threshold-based danger status, and GUI/map updates. The sampled GUI also persists current unit data and can launch a live map. Firmware and map implementation details were not sampled, so those branches rely only on README-documented relationships.

Main entry points: [`RPI unit/FFGUI3.py`](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/FFGUI3.py) (Telemetry monitor), [`arduino units/firefighter1.ino`](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/firefighter1.ino) (Firefighter node 1), [`arduino units/Firefighter2.ino`](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/Firefighter2.ino) (Firefighter node 2), [`RPI unit/map.html`](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/map.html) (Live map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_field["Field sensing"]
  node_env_sensors(("Environmental sensors"))
  node_gps(("GPS receiver"))
  node_ff1["Firefighter node 1<br/>[firefighter1.ino]"]
  node_ff2["Firefighter node 2<br/>[Firefighter2.ino]"]
end

subgraph group_radio["Telemetry transport"]
  node_lora{{"LoRa link"}}
  node_gateway["Receiver gateway"]
  node_serial{{"Serial interface"}}
end

subgraph group_station["Monitoring station"]
  node_gui["Telemetry monitor<br/>[FFGUI3.py]"]
  node_safety["Safety status<br/>[FFGUI3.py]"]
  node_location[("Unit state file<br/>[location.json]")]
end

subgraph group_visual["Operator visualization"]
  node_map["Live map<br/>[map.html]"]
end

node_operator(("Control-room operator"))
node_browser["Chromium browser"]

node_env_sensors -->|"sample readings"| node_ff1
node_gps -->|"provide position"| node_ff1
node_env_sensors -->|"sample readings"| node_ff2
node_gps -->|"provide position"| node_ff2
node_ff1 -->|"transmit telemetry"| node_lora
node_ff2 -->|"transmit telemetry"| node_lora
node_lora -->|"deliver packets"| node_gateway
node_gateway -.->|"forward telemetry"| node_serial
node_serial -->|"read packets"| node_gui
node_gui -->|"evaluate thresholds"| node_safety
node_gui -->|"write unit state"| node_location
node_gui -->|"serve map"| node_map
node_map -.->|"visualize positions"| node_location
node_operator -->|"view status"| node_gui
node_gui -->|"launch map"| node_browser
node_browser -->|"display map"| node_map

click node_ff1 "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/firefighter1.ino"
click node_ff2 "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/Firefighter2.ino"
click node_gateway "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/ReceiverGateway.ino"
click node_gui "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/FFGUI3.py"
click node_safety "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/FFGUI3.py"
click node_location "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/location.json"
click node_map "https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/map.html"

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_env_sensors,node_gps,node_ff1,node_ff2,node_browser toneBlue
class node_lora,node_gateway,node_serial toneAmber
class node_gui,node_safety,node_location toneMint
class node_map toneRose
class node_operator toneIndigo
```

## Components

### Field sensing

- **Environmental sensors**
- **GPS receiver**
- [Firefighter node 1](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/firefighter1.ino): `arduino units/firefighter1.ino`
- [Firefighter node 2](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/Firefighter2.ino): `arduino units/Firefighter2.ino`

### Telemetry transport

- **LoRa link**
- [Receiver gateway](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/arduino%20units/ReceiverGateway.ino): `arduino units/ReceiverGateway.ino`
- **Serial interface**

### Monitoring station

- [Telemetry monitor](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/FFGUI3.py): `RPI unit/FFGUI3.py`
- [Safety status](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/FFGUI3.py): `RPI unit/FFGUI3.py`
- [Unit state file](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/location.json): `RPI unit/location.json`

### Operator visualization

- [Live map](https://github.com/sithumpramu/firefighter-communication-and-management-sys/blob/main/RPI%20unit/map.html): `RPI unit/map.html`

### Other components

- **Control-room operator**
- **Chromium browser**

## Connections

- Environmental sensors → Firefighter node 1: sample readings (evidence: `README.md`)
- GPS receiver → Firefighter node 1: provide position (evidence: `README.md`)
- Environmental sensors → Firefighter node 2: sample readings (evidence: `README.md`)
- GPS receiver → Firefighter node 2: provide position (evidence: `README.md`)
- Firefighter node 1 → LoRa link: transmit telemetry (evidence: `README.md`)
- Firefighter node 2 → LoRa link: transmit telemetry (evidence: `README.md`)
- LoRa link → Receiver gateway: deliver packets (evidence: `README.md`)
- Receiver gateway → Serial interface: forward telemetry
- Serial interface → Telemetry monitor: read packets (evidence: `RPI unit/FFGUI3.py`)
- Telemetry monitor → Safety status: evaluate thresholds (evidence: `RPI unit/FFGUI3.py`)
- Telemetry monitor → Unit state file: write unit state (evidence: `RPI unit/FFGUI3.py`)
- Telemetry monitor → Live map: serve map (evidence: `RPI unit/FFGUI3.py`)
- Live map → Unit state file: visualize positions
- Control-room operator → Telemetry monitor: view status (evidence: `README.md`)
- Telemetry monitor → Chromium browser: launch map (evidence: `RPI unit/FFGUI3.py`)
- Chromium browser → Live map: display map
