Have you ever tracked a loved one’s cab ride in real time, refreshing the screen every few minutes, heart racing every time the car takes a turn you didn’t expect? I’ve been there too — too many times.
Sat Jun 14 2025
It’s a familiar routine:
• Click on the live location link
• Zoom in
• Refresh
• Panic when the car turns slightly off the expected route
• Call: “All good?”
• Repeat
And it’s not just the person tracking — even the passenger often stays alert the entire ride, unable to rest or sleep, just in case something goes wrong.
This anxiety, though understandable, is exhausting. So I decided to build something to automate away that stress.
________________________________________
🧠 From Worry to Solution — A Route Deviation Detection System
I asked myself a simple question:
"What if we could detect when a cab deviates from its intended path — and alert the right people — without constant human monitoring?"
That question turned into a working prototype over a few weekends: A web-based Cab Safety Simulator powered by vector math, GPS logic, and OpenRouteService APIs.
________________________________________
🎬 What the Simulator Does
• I input a start and destination location
• The system fetches an optimal route using OpenRouteService
• I simulate the cab’s journey — including intentional off-route movements
• When the cab deviates from its expected vector path, the system triggers an alert
• A new route is fetched automatically, and tracking resumes
Think of it as a self-healing GPS guardian — no need for panic or manual intervention.
________________________________________
🛠️ How It’s Built — Under the Hood
Frontend:
• JavaScript + Leaflet.js for map visualization
• Smooth UI to draw routes and simulate car movement
Backend:
• Python backend for deviation detection
• Vector comparison logic determines if the cab's heading significantly diverges
• Alert and reroute trigger logic
External API:
• OpenRouteService (ORS) for real-time routing data
________________________________________
⚙️ Why Not Use Google or Apple’s Deviation Alerts?
Great question. Here’s the catch:
Google and Apple’s deviation alerts are designed for the person in the cab, not for someone monitoring remotely.
My system solves for a different use case:
✅ Works remotely — ideal for worried parents, partners, or friends
🧠 Direction-aware — uses vector math, not just turn deviations
🔁 Fully autonomous — reroutes and resumes tracking without human input
🔌 Scalable — embeddable in existing apps, ride APIs, or safety dashboards
🛰️ Expandable — useful for employee safety, fleet tracking, campus monitoring, etc.
________________________________________
🚀 What’s Already Built
✅ Real-time GPS tracking simulation
✅ Direction-aware deviation detection
✅ Autonomous rerouting and continued monitoring
✅ An interactive frontend simulator for testing
________________________________________
💭 What’s Next?
This started as a personal learning project, but it’s growing fast. Here’s what I’m exploring:
• 🌐 Field trials with actual GPS devices
• 📱 A mobile app prototype (Firebase or Supabase)
• 🔔 Real-time push alerts for deviation
• 🔒 Authentication and trip-sharing features