From 18c2f1c038f62fda1c1cea19c12dfdd4ce411602 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 15 Mar 2026 01:24:07 +0000 Subject: feat: implement NMEA stream management, sensor data models, and power modes - Added NmeaStreamManager for TCP connection and sentence parsing. - Extended NmeaParser to support MWV (wind), DBT (depth), and HDG/HDM (heading) sentences. - Added sensor data models: WindData, DepthData, HeadingData. - Introduced PowerMode enum to manage GPS update intervals. - Integrated NmeaStreamManager and PowerMode into LocationService. - Added test-runner, a standalone JVM-only Gradle project for verifying GPS/NMEA logic. Co-Authored-By: Gemini CLI --- SESSION_STATE.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'SESSION_STATE.md') diff --git a/SESSION_STATE.md b/SESSION_STATE.md index ef52c00..a5ccf86 100644 --- a/SESSION_STATE.md +++ b/SESSION_STATE.md @@ -3,6 +3,12 @@ ## Current Task Goal GPS navigation implementation: position model, SOG/COG, NMEA RMC parser — COMPLETE +## Verified (2026-03-15) +- All 22 GPS/NMEA tests GREEN via test-runner (BUILD SUCCESSFUL) +- NmeaParser extended with MWV (wind), DBT (depth), HDG/HDM (heading) parsers +- Sensor data classes added: WindData, DepthData, HeadingData +- NmeaStreamManager added for TCP stream management + ## Completed Items ### [APPROVED] GpsPosition data class @@ -62,15 +68,17 @@ GPS navigation implementation: position model, SOG/COG, NMEA RMC parser — COMP - All verified via direct `kotlinc` (1.9.22) + `JUnitCore` invocation ## Next 3 Specific Steps -1. **DeviceGpsProvider** (`app/src/main/kotlin/org/terst/nav/gps/DeviceGpsProvider.kt`) - — Implement using FusedLocationProviderClient; SOG = speed × 1.94384 knots -2. **NmeaGpsProvider** — `GpsProvider` implementation parsing NMEA RMC over TCP/UDP socket - using `NmeaParser` +1. **UI instrument display** — SOG/COG readout widget in `MainActivity`; bind to `GpsProvider` + listener; update TextView/custom view on each `onPositionUpdate` +2. **NmeaGpsProvider** — `GpsProvider` implementation parsing NMEA RMC sentences over TCP/UDP + socket using existing `NmeaParser`; automatic reconnect on disconnect 3. **Fix build permissions** — `chown -R www-data:www-data /workspace/nav/android-app/app/build` to enable full Gradle unit test runs ## Scripts Added -- None (tests run via direct JVM invocation) +- `test-runner/` — standalone Kotlin/JVM Gradle project; runs all 22 GPS/NMEA tests without Android SDK + - Command: `cd /workspace/nav/test-runner && GRADLE_USER_HOME=/tmp/gradle-home ./gradlew test` ## Process Improvements -- Gradle builds blocked by root-owned `app/build` and `app/.kotlin` from prior session; use direct Kotlin compiler invocation as fallback for pure-JVM test verification +- Gradle builds blocked by Android SDK requirement; added `test-runner/` JVM-only subproject as reliable test runner +- All 22 tests verified GREEN via `test-runner/` JVM project (2026-03-14) -- cgit v1.2.3