Worker + subdomain now drones.theradicalparty.com; in-app title/brand, package names, docs updated. D1 database binding kept as-is. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.7 KiB
🚁 Drones
Turn a drone survey into georeferenced animal/object detections on a 3D map.
A drone flies a survey → thermal+RGB frames + telemetry → an AI detector emits
warm-blob detections → each is projected onto terrain as (lat, lon, type, confidence, temp, time) → this app plots them on a 3D terrain globe with a
timeline you can replay.
The dashboard runs today off a built-in simulator, so the whole UI is done and
testable before any drone arrives. Real footage feeds the same dashboard via
POST /api/ingest.
Stack
- Cloudflare Worker + Hono (
src/index.js) - MapLibre GL JS — satellite imagery + Terrarium DEM for real 3D terrain (no API key)
- D1 (optional) — stores real surveys/detections; schema in
schema.sql - Deploys to
drones.theradicalparty.com
Run locally
npm install
npm run dev # http://localhost:8787
Open / for the dashboard. Point it anywhere:
/?lat=-33.73&lon=150.31&r=1000 # center, radius (m)
/?seed=42 # different simulated survey
Data contract (what the drone pipeline must produce)
GET /api/survey returns:
{
"survey": { "id","name","center_lon","center_lat","radius_m","sensor","drone","started_at","ended_at","simulated" },
"flight": [ { "seq","lon","lat","agl_m","t" } ],
"detections": [ { "id","type","lon","lat","confidence","temp_c","t","frame" } ],
"stats": { "total","counts","area_km2","duration_min" }
}
type ∈ deer | fox | rabbit | boar | kangaroo | person | vehicle | unknown.
Feeding real drone data
wrangler d1 create drones, paste the id intowrangler.toml, uncomment the binding.npm run db:initPOST /api/ingestwith{ survey, flight, detections }.- View it at
/?survey=<id>.
The georeferencing step (frame + drone GPS + gimbal angle + terrain → lat/lon) lives in the drone pipeline, not here — this app just needs the resulting detections.
Drone ingest pipeline
See pipeline/ — turns real drone footage + DJI telemetry into
georeferenced detections and POSTs them here. Runs end-to-end today via a
synthetic flight + stub detector; drop in a trained YOLO model for real thermal.
Roadmap
- Drone ingest pipeline (frames + SRT telemetry → detector → georeferencer → ingest)
- Wire a trained thermal-wildlife YOLO model into the ONNX detector
- Remote D1 (needs a D1-capable Cloudflare token; live site runs the simulator until then)
- Live mode (stream detections during flight, not just post-survey)
- Track clustering (merge repeat sightings of the same animal across passes)
- DEM-based georeferencing (ray/terrain intersection instead of flat ground)