Smart India Hackathon 2026
In open-cast iron ore mines, dense fog severely limits visibility on haul roads. Drivers cannot see approaching vehicles, blind corners, or stopped hazards early enough. This leads to collisions, injuries, and operational downtime.
HaulSight provides an additional safety layer by tracking equipped vehicles, modelling the mine's haul-road network, calculating collision risk in real time, and generating targeted warnings โ even when GPS or network connectivity fails.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HaulSight Architecture โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Vehicle โโโโโถโ Roadside โโโโโถโ Control Room โ โ
โ โ Unit โLoRaโ Gateway โAPI โ Backend โ โ
โ โ (GPS+IMU) โ โ (ESP32) โ โ (FastAPI+SQLite) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโ โฌโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโผโโโโโโโโโโโโ โ
โ โ WebSocket โ REST API โ โ
โ โผ โผ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ Control Room โ โ โ
โ โ Dashboard โ โ โ
โ โ (React + Leaflet + Tailwindโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Independent Radar Fallback (LoRa-free) โ โ
โ โ Blind Corner Beacons โ Local Visual + Audible Alert โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Feature | Description |
|---|---|
| ๐บ๏ธ Live Mine Map | Interactive Leaflet map showing haul roads, blind corners, and vehicle positions |
| ๐ Vehicle Tracking | Real-time position, speed, heading, and status for all equipped vehicles |
| Deterministic pairwise evaluation using TTC (time-to-conflict) and closing distance | |
| ๐ Targeted Alerts | Alerts identify specific vehicle pairs and explain WHY a risk was generated |
| ๐ก Radar Fallback | Independent radar beacons at blind corners detect non-equipped vehicles |
| ๐ State Machine | Vehicles transition through LIVE โ STALE โ OFFLINE with configurable thresholds |
| ๐ Anti-Oscillation | Hysteresis and debouncing prevent rapid SAFEโWARNING flickering |
| ๐ฎ Demo Scenarios | 3 scripted scenarios for live demonstration |
| โ๏ธ Configurable | All thresholds tunable via YAML config file |
- Python 3.11+
- Node.js 18+
- pip
- npm
git clone https://github.com/your-team/haulshight.git
cd haulshightcd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python run.pyBackend runs at http://localhost:8000
cd frontend
npm install
npm run devDashboard runs at http://localhost:5173
The frontend proxies API and WebSocket requests to the backend automatically.
Once both servers are running, open the dashboard and use the scenario buttons in the header:
| Button | Scenario | What Happens |
|---|---|---|
| Scenario 1 | Normal Operation | Two vehicles approach a blind corner, risk escalates SAFE โ CAUTION โ WARNING โ CRITICAL |
| Scenario 2 | Network Failure | Gateway connectivity drops, dashboard shows degraded state, radar continues working |
| Scenario 3 | Non-Equipped Vehicle | Radar detects an unknown vehicle at a blind corner, generates local warning |
| Reset | Restore Normal | All systems return to normal operation |
haulshight/
โโโ backend/
โ โโโ app/
โ โ โโโ main.py # FastAPI app entry point
โ โ โโโ config.py # Configuration loader
โ โ โโโ database.py # SQLite connection + schema
โ โ โโโ models.py # Pydantic data models
โ โ โโโ state.py # In-memory vehicle state store
โ โ โโโ api/
โ โ โ โโโ vehicles.py # Vehicle endpoints
โ โ โ โโโ roads.py # Road graph endpoints
โ โ โ โโโ alerts.py # Alert endpoints
โ โ โ โโโ radar.py # Radar endpoints
โ โ โ โโโ websocket.py # WebSocket broadcaster
โ โ โโโ services/
โ โ โ โโโ telemetry.py # Telemetry ingestion + validation
โ โ โ โโโ vehicle_state.py # State machine transitions
โ โ โ โโโ risk_engine.py # Pairwise collision risk
โ โ โ โโโ alert_manager.py # Alert lifecycle + debounce
โ โ โ โโโ radar_service.py # Radar beacon management
โ โ โ โโโ stale_detector.py# Background stale/offline check
โ โ โ โโโ road_graph.py # Road graph in-memory model
โ โ โโโ simulator/
โ โ โโโ vehicle_sim.py # Vehicle telemetry simulator
โ โ โโโ radar_sim.py # Radar detection simulator
โ โ โโโ scenarios.py # Demo scenario scripts
โ โโโ data/
โ โ โโโ mine_graph.json # Road network definition
โ โ โโโ default_config.yaml # Configurable thresholds
โ โโโ requirements.txt
โ โโโ run.py # Entry point
โโโ frontend/
โ โโโ src/
โ โ โโโ App.jsx # Root component + WS setup
โ โ โโโ api/
โ โ โ โโโ client.js # REST API helpers
โ โ โ โโโ websocket.js # WebSocket manager
โ โ โโโ stores/ # Zustand state stores
โ โ โโโ components/
โ โ โ โโโ layout/ # Header, MainLayout
โ โ โ โโโ map/ # MineMap, VehicleMarker, RadarBeaconMarker
โ โ โ โโโ panels/ # VehicleList, AlertPanel, SystemHealth
โ โ โ โโโ ui/ # StatusBadge, RiskBadge
โ โ โโโ styles/theme.js # Color palette
โ โโโ vite.config.js
โ โโโ package.json
โโโ README.md
All thresholds are in backend/data/default_config.yaml:
# Vehicle state detection
stale_threshold_seconds: 10 # No telemetry for this โ STALE
offline_threshold_seconds: 30 # No telemetry for this โ OFFLINE
# Risk engine thresholds
ttc_critical_seconds: 5.0 # Time-to-conflict for CRITICAL
ttc_warning_seconds: 10.0 # Time-to-conflict for WARNING
ttc_caution_seconds: 15.0 # Time-to-conflict for CAUTION
dist_critical_meters: 20.0 # Distance for CRITICAL
dist_warning_meters: 50.0 # Distance for WARNING
dist_caution_meters: 100.0 # Distance for CAUTION
# Alert debouncing
risk_debounce_ticks: 3 # Ticks before alert fires
risk_downgrade_ticks: 6 # Ticks before alert resolves
blind_corner_threshold_multiplier: 0.7 # Tighter thresholds at blind cornersHaulSight does not use ML for collision detection. It uses deterministic, explainable rule-based logic:
For each vehicle pair (A, B):
1. Are they on the same or connected road segments?
2. Are they heading toward each other? (closing speed > 0)
3. Calculate time-to-conflict (TTC) = distance / closing_speed
4. Compare TTC against thresholds:
TTC < 5s โ CRITICAL
TTC < 10s โ WARNING
TTC < 15s โ CAUTION
5. Apply blind-corner multiplier (30% tighter)
6. Apply hysteresis (immediate upgrade, gradual downgrade)
Every alert includes a human-readable reason explaining the risk.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/telemetry |
Ingest vehicle telemetry |
GET |
/api/v1/vehicles |
List all vehicles with live state |
GET |
/api/v1/roads |
Full road graph |
GET |
/api/v1/alerts |
Active alerts |
GET |
/api/v1/alerts/history |
Alert history |
GET |
/api/v1/radar/beacons |
Radar beacon status |
POST |
/api/v1/radar/detections |
Report radar detection |
POST |
/api/v1/scenario/{name} |
Trigger demo scenario |
GET |
/api/v1/health |
System health |
WS |
/ws |
Real-time updates |
| Color | Hex | Usage |
|---|---|---|
| Primary Blue | #2FA4D7 |
Actions, normal states, SAFE risk |
| Warm Cream | #F5E9D8 |
Backgrounds, surfaces |
| Dark Brown | #3E2C23 |
Text, structural elements |
| Orange | #E76F2E |
Warnings, CAUTION risk |
| Red | #DC2626 |
CRITICAL risk |
Risk badges maintain semantic meaning regardless of theme.
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 8, Tailwind CSS 4, Zustand |
| Map | React-Leaflet + OpenStreetMap |
| Backend | Python 3.11+, FastAPI, aiosqlite |
| Database | SQLite |
| Real-time | WebSocket (FastAPI native) |
| Communication | REST + WebSocket |
| Hardware Interface | Modular telemetry API (LoRa/ESP32 ready) |
- GPS Jumps โ Rejects impossible position changes
- Duplicate Packets โ Deduplication via message ID
- Out-of-Order Packets โ Sequence number validation
- Missing Telemetry โ LIVE โ STALE โ OFFLINE state machine
- Stopped Vehicles โ Treated as static hazards, not ignored
- Non-Equipped Vehicles โ Radar-only detection at blind corners
- Alert Oscillation โ Hysteresis prevents rapid flickering
- GPS Degradation โ Marked as DEGRADED, conservative thresholds
- Malformed Packets โ Rejected safely, logged
- Road Changes โ Graph is JSON-configurable
# Test health endpoint
curl http://localhost:8000/api/v1/health
# List tracked vehicles
curl http://localhost:8000/api/v1/vehicles
# Get road graph
curl http://localhost:8000/api/v1/roads
# Trigger scenario
curl -X POST http://localhost:8000/api/v1/scenario/1Built for Smart India Hackathon 2026
| Name | Role | Department |
|---|---|---|
| Priyansha Gour (Captain) | Electronics and Telecommunication Engineering (E&TC) | |
| Dhakshayini Usha R | Electronics and Telecommunication Engineering (E&TC) | |
| Mishree Kalaria | Electronics and Telecommunication Engineering (E&TC) | |
| Yash Rastogi | Electronics and Telecommunication Engineering (E&TC) | |
| Yash Pratap Singh | Electronics and Telecommunication Engineering (E&TC) | |
| Harman | Computer Science Engineering Student (CSE) |
MIT License
HaulSight โ Because every miner deserves to go home safe.