00 - RouteTrack Pi — Project Overview

Project Name: RouteTrack Pi
Category: Embedded Linux · GPS Telemetry · Data Processing · Flask
Platform: Raspberry Pi
Status: Active / Production-Ready Prototype


Project Summary

RouteTrack Pi is a vehicle-mounted, headless GPS telemetry and route analysis system built on a Raspberry Pi.
It continuously logs GPS data, processes that data into meaningful metrics (mileage, stops, time-on-site), and presents results through a local web dashboard — all without requiring constant internet connectivity.

The system is designed with reliability, recoverability, and real-world vehicle use in mind:

This project mirrors architectural patterns used in fleet tracking and telemetry systems, scaled down to run on low-power hardware.


Core Capabilities


Hardware Used

Component Description
Raspberry Pi 3 B+ Primary compute platform
GlobalSat BU-353N USB GPS Receiver High-sensitivity USB GPS (NMEA 0183)
128 GB microSD card OS + data storage
Always-on cooling fan Wired directly to 5V rail for vehicle use
Vehicle USB power Portable, ignition-controlled

Why this GPS receiver:
The BU-353N is widely supported on Linux, requires no proprietary drivers, and is well-suited for mobile deployments.


Operating System & Base Software


Networking Design


GPS Subsystem Architecture

USB GPS Receiver
   ↓
Linux USB-Serial Driver
   ↓
/dev/gps0 (udev symlink)
   ↓
gpsd-standalone.service
   ↓
TCP localhost:2947
   ↓
RouteTrack Logger

Key Design Choices

GPS Service


RouteTrack Directory Layout

All project files live under a single, predictable root:

/opt/routetrack/
├── bin/        # Executable scripts
├── data/       # SQLite database and exports
├── logs/       # File-based logs (future use)
├── config/     # Database schema and config files
├── venv/       # Python virtual environment
└── web/        # Flask dashboard application

Python Virtual Environment

Installed Python Packages


Data Storage (SQLite)

Database File

/opt/routetrack/data/routetrack.sqlite

Tables

Table Purpose
gps_points Raw GPS telemetry (append-only)
stop_events Derived stationary events
daily_summary Aggregated per-day metrics
shifts User-controlled session boundaries

Design Philosophy


GPS Logging Service

Script

/opt/routetrack/bin/routetrack-logger.py

systemd Service

routetrack-logger.service

Responsibilities

Why this matters:
The logger is intentionally lightweight and resilient — it prioritizes never stopping, even during GPS hiccups or reboots.


🧠 Route Processing & Intelligence

Processing Script

/opt/routetrack/bin/routetrack-process.py

What It Calculates

Key Rules


Automated Processing (systemd)

Wrapper Script

/opt/routetrack/bin/routetrack-run-processor.sh

Services

Automation Workflow

  1. Stop logger (release DB lock)

  2. Run processor

  3. Restart logger

This ensures zero SQLite locking issues.


Local Web Dashboard

Stack

Dashboard Files

/opt/routetrack/web/
├── app.py
├── templates/
│   └── index.html
└── static/

API Endpoints

systemd Service

routetrack-dashboard.service

Shift Mode

Shift Mode introduces user-defined session boundaries independent of calendar days.

Table

shifts

Purpose


Reliability & Operational Design


Why This Project Matters

RouteTrack Pi demonstrates:

This is not a script - it’s a system.


Future Enhancements (Planned)


Revision #1
Created 25 December 2025 18:11:35 by Nate Nash
Updated 25 December 2025 18:15:28 by Nate Nash