0.01 vs 20–75false off-trail warnings an hour, Athar vs a 30 m rule (simulated)
01The problem
Why it exists
Saudi trails are often unmarked, out of signal, and dangerous in heat and flash floods. Athar downloads an area once and then works with no signal: its own topographic map drawn on the phone, trails from OpenStreetMap or GPX, and warnings when you leave the trail that do not cry wolf. Around that sit the safety and planning tools a desert hike needs, and club events for groups such as a Friday hash: one link for the trail, a safety net that keeps the marks a game, and a headcount so nobody is left in the desert.
02The system
What I built
Open dataelevation tiles, OpenStreetMap
On-device topo mapcontours, hillshade, trails
Off-trail detectorhysteresis by GPS accuracy
Safetymesh, SOS, family link
Club eventsWorkers + D1, headcount
An offline topo map rendered on the device as map tiles: hillshade and contours (marching squares) from open elevation tiles, plus footpaths, tracks, wadis and water from OpenStreetMap
An off-trail detector with hysteresis that widens with GPS accuracy, measured against the common "warn beyond 30 m" rule on simulated hikes with phone-like GPS noise, multipath jumps and canyon reception
Planning: Tobler walking times that learn your own pace on each slope, the best start time by felt heat with terrain shade (sun position plus a terrain ray-march), flash-flood watch where trails cross wadis, a route planner over open ground (A* on the terrain) and a campsite finder
Safety: an offline Bluetooth/Wi-Fi group mesh, a family live link where the server decides "overdue", fall and inactivity detection, a bilingual SOS with a 160-character satellite version, a Morse beacon, and spatial audio (with AirPods head tracking) that points back to the trail
Club events on a Cloudflare Worker and D1: the hare records the trail and drops marks, members check in from one link, the sweep sees who is still out, and the same pages work on Android
The "Sand and Ink" design in Arabic and English (IBM Plex Sans Arabic, right-to-left), with a go / no-go card for today, glance mode, a red night mode, an Apple Watch app that follows trails on its own, widgets and a complication
03The result
What it achieved
In 1,600 simulated hikes Athar caught every wrong turn with at most 0.01 false warnings an hour, where the 30 m rule warned 20 to 75 times an hour on the trail; it notices a 45° wrong turn after a median 48 seconds. Learning a hiker's pace from three hikes cut the median walking-time error from 13.3% to 3.7% (50 simulated hikers, 500 predictions). The battery-saver GPS still catches every wrong turn, 6 seconds later at 45°. 61 unit tests and 34 end-to-end backend checks pass in production.
Published limits
The limits are published: the hikers are simulated, the app has not been field-tested yet, and a field-test mode exists so a real club hike can replace the simulation.
S
Screens
The app, running
The iPhone app running as a Mac build on a practice trail; the window frame is the Mac’s. Trail data from OpenStreetMap; the hike is a practice run.