Smart Bus Arrival Detector
A commuter-first mobile app designed for tracking municipal buses in real time with machine-learning powered ETA predictions across Pokhara city routes.
The Problem & Background
In cities like Pokhara, public transit commuters face significant uncertainty regarding bus arrival times. Without a centralized dispatch or telemetry system, passengers frequently wait at bus stops for unpredictable intervals, and traffic bottlenecks fluctuate dynamically during peak hours.
The Smart Bus Arrival Detector was built to eliminate this commuter friction by broadcasting GPS telemetry from active transit buses and applying route-aware machine learning models to calculate dynamic arrival windows.
Key Features
Live Bus Radar
Visual map interface rendering moving bus coordinates with smooth marker interpolation and route waypoints.
ML ETA Forecasting
Dynamic arrival time computation factoring in historical road segment speeds, time-of-day traffic, and current velocity.
Stop Proximity Alerts
Configurable push notifications that alert commuters 5 and 2 minutes before the bus arrives at their selected stop.
Route Planning
Browse municipal transit routes, stops, and schedules with offline caching for frequent daily commutes.
Architecture & Data Pipeline
The system consists of three interconnected layers:
1. Telemetry Ingestion
Low-latency telemetry streaming using Firebase Realtime Database for lightweight, real-time push synchronization across mobile clients.
2. Prediction Engine
Regression models trained on route transit segment datasets calculate dynamic arrival windows instead of static distance-over-speed estimates.
3. Client Application
Cross-platform React Native frontend optimized for battery efficiency, minimizing GPS background polling while retaining high accuracy.
Key Engineering Challenges & Solutions
Challenge 1: GPS Drift & Map Snapping
In hilly terrain and narrow streets around Pokhara, raw GPS readings exhibited occasional jitter and drift away from the mapped roads. To solve this, a Kalman filter and road-network snap-to-polyline algorithm were applied to guarantee seamless marker trajectories on Google Maps.
Challenge 2: Battery & Data Bandwidth Consumption
Constant real-time network subscriptions on budget smartphones drain battery rapidly. We implemented adaptive polling intervals: when a bus is idle or distant, updates stream every 10 seconds, scaling up to sub-second updates only when approaching a designated commuter radius.