MotorSignal-App/FEATURES_CHANGELOG.md

91 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MotorSignal — Features, Architecture & Changelog
A comprehensive summary of all implemented features, system optimizations, user interface overhauls, and bug fixes.
---
## 🏍️ 1. Speedometer & Telemetry Engine (Ultra-Fast 20Hz)
* **High-Rate GNSS Polling**: Configured Google Play Services Fused Location Provider on Android at **100ms (10Hz)** update intervals (`LocationAccuracy.bestForNavigation`).
* **Dynamic Fast-Tracking EMA Filter**: Replaced static low-pass filtering with dynamic alpha:
* **Accelerating / Braking**: Dynamically switches to **`0.90`** alpha for instant throttle and braking responsiveness without gauge lag.
* **Steady Cruising**: Stabilizes at **`0.75`** alpha to suppress sensor noise.
* **Jitter Deadband**: Speeds under `0.6 m/s` (~1.3 MPH) are treated as stationary `0.0 MPH` to eliminate indoor GPS drift while stationary.
* **Immediate Stream Dispatch (20Hz)**: Emits telemetry samples immediately upon every GPS and IMU event, alongside a 50ms periodic heartbeat in `lib/services/telemetry_service.dart`.
* **Lean Angle & G-Force Sensor Fusion**: Real-time roll/pitch complementary filtering fused with accelerometer and gyroscope sensors for accurate real-time cornering lean angles.
---
## 🗺️ 2. Tactical Route Maps & Level-of-Detail (LOD)
* **High-Detail Street Zoom (17.0)**: Upgraded default tactical map zoom from 15.5 to 17.0, revealing building footprints, street names, highway lanes, and driveways.
* **Dual Rendering Backends**:
* **OpenStreetMap / Tactical Vector Engine** (primary dark-mode HUD).
* **Google Maps SDK** with real-time traffic and dark night styling.
* **Dynamic Platform-View Sizing**: Constraint-based view keys prevent map letterboxing, clipping, or distortion when rotating between portrait and landscape.
---
## 🚔 3. Speed Traps, Police Radars & Road Hazard Feeds
* **TomTom Traffic Provider v5 Upgrade**:
* Upgraded from deprecated path-based endpoints to official v5 query-parameter API (`https://api.tomtom.com/traffic/services/5/incidentDetails?key=...&bbox=...`).
* Added automated API key whitespace trimming and connection testing.
* **OpenStreetMap / Overpass Speed Camera Ingestion**: Scrapes verified highway speed traps, red-light cameras, and fixed enforcement nodes.
* **Self-Hosted Waze Relay Server (Option A)**:
* Built complete Node.js / Docker relay server in `server/waze_relay/`.
* Bypasses Cloud Armor bot blocking, fetches live alerts, normalizes schemas, and caches geo-grids with 30s TTL.
* **Community Traffic Provider**: Allows custom endpoint input (`http://<IP>:3000/alerts`) to stream police traps and road hazards directly onto the cockpit map.
---
## 📱 4. Evolution Dashboard & Landscape Cockpit
* **Dual UI Themes**: Full switchable support for **Classic** (analog telemetry) and **Evolution** (futuristic cyberpunk HUD).
* **Landscape Cockpit Mode**:
* **65% Tactical Map**: Live vehicle heading marker, dynamic alerts, and zoom controls.
* **35% Telemetry Stack**: Live G-Force target matrix with Accel/Braking bars, Lean Angle arc with Left/Right peak indicators, and large italic digital speedometer.
* **Compact Landscape Top Bars**:
* Shrunk header and AppBar height to **36px** in landscape mode across Settings, Records, History, and Garage screens to maximize vertical screen real estate (~360–400px devices).
---
## 🏁 5. Interactive Route Preview & Ride History
* **Interactive Blueprint Cards**: Replaced static blueprint placeholders in `evolution_ride_details_view.dart` with active tap handlers leading directly to the route viewer.
* **Full Route Polyline Rendering**: Draws the cyan GPS breadcrumb path for historical rides on the tactical map.
* **Start & Finish Indicators**:
* 🟢 **START**: Green Flag marker at the first GPS coordinate.
* 🏁 **FINISH**: Checkered Flag marker at the final GPS coordinate.
* **Telemetry Event Overlays**: Filter chips for Hard Acceleration, Hard Braking, Cornering Gs, and Speed Milestones plotted on the map.
* **CSV & GPX Export**: Full telemetry export support for external analysis and ride archiving.
---
## 🔊 6. Audio & Voice Hazard Warnings
* **Text-to-Speech (TTS) Engine**: Spoken voice alerts for approaching speed traps, red light cameras, and road hazards.
* **Proximity Triggers**: Auto-calculates user distance to ahead hazards and triggers audio announcements at configurable distances (e.g. 500m / 1000m).
* **Session Lifecycle Audio**: Spoken confirmations on session start, pause, and completion.
---
## 🛡️ 7. Database & Black-Box Field Testing
* **Drift / SQLite Architecture**:
* Tables for `Rides`, `TelemetrySamples`, `RideEvents`, `PerformanceRuns`, `GarageMotorcycles`, and `FieldTestSessions`.
* Batch insertions and periodic state machine flushes to protect against sudden power loss.
* **Crash Recovery**: Auto-detects unfinished rides upon app restart and recovers duration, timestamps, and stats.
* **Black-Box Diagnostic Logging**: Comprehensive sensor fusion, IMU calibration, and GPS rejection tracking.
---
## 🏍️ 8. Motorcycle Garage & Records
* **Digital Garage**: Multi-bike management (Make, Model, Year, VIN, Notes, Custom Specs).
* **Personal Records System**:
* Top Speed (MPH)
* Acceleration Sprints (0–60 MPH, 0–100 MPH)
* Peak Lean Angles (Max Left ° / Max Right °)
* Peak G-Forces (Max Acceleration G / Max Braking G)