Skip to content

lostfleetdev/GLIDAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GLIDAR

Gunshot-Locating Intelligent Detection & Autonomous Reporting (GLIDAR) is a hackathon prototype for collecting incident telemetry from ESP32 nodes, forwarding data through fallback routing, and recording events on a Flask backend.

Initial idea

The project started as a low-cost, distributed safety system:

  1. Place multiple ESP32 nodes across an area.
  2. Let each node report incident telemetry to a central backend.
  3. If the backend is temporarily unreachable, route data through a nearby node instead of dropping it.
  4. Keep an event trail for later analysis and response.

The core goal was reliability under unstable network conditions using simple hardware and a lightweight software stack.

What is in this repository

This project currently has three working areas:

  1. prototype1/backend/main.py - Flask receiver that accepts JSON on POST /data and appends records to data.csv.
  2. prototype1/esp/main.py - MicroPython logic for ESP32 periodic reporting and ESP-to-ESP fallback forwarding.
  3. simulation/scene1.py, simulation/new1.py - Manim scenes for graph/transformation visualization.

Current status

  • Overall maturity: prototype stage.
  • Backend: minimal and functional for local ingestion.
  • ESP firmware: concept implemented, but hard-coded network/server values and basic error handling keep it lab-only.
  • Simulation: useful for visuals/demo; separate from telemetry pipeline.
  • Documentation: now updated with runnable setup and known limits.

Quick start (local backend)

Prerequisites

  • Python 3.10+
  • uv installed

Run the Flask collector

From GLIDAR:

uv run --with flask python prototype1/backend/main.py

The API listens on:

  • POST http://0.0.0.0:5000/data

Example request:

curl -X POST http://127.0.0.1:5000/data \
  -H "Content-Type: application/json" \
  -d "{\"id\":\"ESP32_1\",\"routed\":false,\"timestamp\":\"2026-01-01T10:00:00\"}"

Data is appended to data.csv in the current working directory.

Running the Manim simulations

From GLIDAR:

uv run --with manim --with numpy manim -pql simulation/scene1.py DynamicGraphTransformation
uv run --with manim --with numpy manim -pql simulation/new1.py GraphTransformation

Rendered media is written under the simulation/media/ tree.

ESP32 firmware notes

prototype1/esp/main.py targets MicroPython and is not executable with standard CPython.

Before flashing/running on hardware:

  1. Update Wi-Fi credentials and server URLs.
  2. Confirm reachable backend host and port on your LAN.
  3. Validate payload keys and timestamp serialization format expected by the backend.

Deployment notes

For a stable deployment, prioritize:

  1. Move credentials and endpoints to environment variables or device config.
  2. Add payload schema validation and structured logging on the Flask API.
  3. Replace CSV append-only storage with a database (SQLite/PostgreSQL).
  4. Add authentication between ESP clients and backend.
  5. Package backend with a production WSGI server and reverse proxy.

Known limitations

  • No test suite or CI checks.
  • No dependency lockfile (pyproject.toml / requirements.txt) yet.
  • Backend has no auth, validation, or rate limiting.
  • ESP fallback logic is tightly coupled to static IPs.
  • Simulation code does not yet integrate with real telemetry.

About

GunShot-Locating Intelligent Detection Autonomous Reporting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages