Back to Portfolio
Smart Bus Arrival Detector Interface Preview
Mobile • Machine Learning • IoT Pokhara City Transit

Smart Bus Arrival Detector

A commuter-first mobile app designed for tracking municipal transit buses in real time with machine learning powered dynamic ETA predictions across Pokhara routes.

Role: Mobile & ML Developer
Platform: Android & iOS (React Native)
< 1.5s
Telemetry Latency

Push synchronization from bus GPS trackers via Firebase RTDB.

± 2 min
ETA Precision

Segment-based regression models trained on historical transit speeds.

75%
Battery Saved

Dynamic polling reduces GPS network wakeups when bus is distant.

100%
Polyline Match

Kalman filter + route-snapping eliminates visual marker jitter.

Technologies & Libraries

React Native Firebase RTDB Google Maps SDK Python ML (Regression) Kalman Filter

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.

Architecture & Telemetry Pipeline

Telemetry flows in real time from bus hardware to passenger mobile devices:

Stage 1
GPS Device
Hardware unit transmits bus coordinates every 2s
Stage 2
Firebase RTDB
Real-time JSON sync engine broadcasts location updates
Stage 3
Segment ML
Historical traffic model computes dynamic stop ETA
Stage 4
Mobile App
React Native renders smooth interpolated map markers

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 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.

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 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.

Previous Case Study Gate Automation Next Case Study UniLib