05 - RouteTrack Pi — Route Intelligence & Metrics Engine

Date: December 24th, 2025
Category: Raspberry Pi / GPS / Data Processing
Backlink: RouteTrack Pi — GPS Data Logging Service


Project Goal

This phase introduces the route intelligence layer for RouteTrack.

Raw GPS points alone are not useful for reporting or visualization. This page defines how RouteTrack transforms logged GPS data into meaningful metrics such as:

These metrics will later power:


Data Inputs

This phase consumes GPS data already being logged into SQLite:

Table: gps_points

Key fields used:

Only mode = 3 records are considered trustworthy for route calculations.


Route Mileage Calculation

Method: Haversine Distance

Mileage is calculated using the Haversine formula, which computes the great-circle distance between two latitude/longitude points on Earth.

This approach is:

Rules Applied

To avoid false mileage caused by GPS drift:

Movement Threshold

A minimum speed threshold is applied:

This filters out:


Stop Detection (Time-on-Site)

Stops are inferred from GPS behavior rather than ignition signals.

Stop Definition

A stop event occurs when:

This prevents brief slowdowns (traffic, turns) from being classified as stops.


Stop Events Table (Planned)

Detected stops will be stored in a dedicated table.

Table: stop_events (planned)

Fields:

Each stop represents a single continuous stationary period.


Daily Route Summaries

RouteTrack will generate daily summaries based on processed GPS data.

Metrics Tracked Per Day

Daily Summary Table (Planned)

Table: daily_summary

Fields:

Daily summaries allow:


Processing Strategy

Route intelligence will be computed using post-processing scripts, not in the logger itself.

Reasons:

Processing can be triggered:


Relationship to Local Dashboard

The local dashboard will not calculate metrics in real time.

Instead, it will:

This keeps the UI responsive and the system scalable.


Current Status

At this stage:


Next Steps

The next phase will implement:

  1. Route processing script

    • Compute mileage

    • Detect stops

    • Populate summary tables

  2. Database schema extensions

    • stop_events

    • daily_summary

  3. Local Web Dashboard

    • Flask backend

    • Leaflet-based map

    • Live and historical views


Why This Page Matters

This page clearly separates:

It is just a thoughtful write up on my next page which will be integrating the data before bringing up the Flask + Leaflet dashboard so it will launch with meaningful data!


Revision #3
Created 25 December 2025 02:25:09 by Nate Nash
Updated 25 December 2025 18:15:28 by Nate Nash