summaryrefslogtreecommitdiff
path: root/.agent
diff options
context:
space:
mode:
Diffstat (limited to '.agent')
-rw-r--r--.agent/design.md30
-rw-r--r--.agent/worklog.md19
2 files changed, 49 insertions, 0 deletions
diff --git a/.agent/design.md b/.agent/design.md
index ba82612..545fe65 100644
--- a/.agent/design.md
+++ b/.agent/design.md
@@ -72,9 +72,37 @@ Existing solutions force sailors to switch between a charting app, a weather app
| Offline charts/weather | - | ✓* | ✓* | ✓✓ | ✓✓ | ✓ | ✓ | ✓✓ |
| Trip logbook | ✓ | - | - | ✓* | - | - | - | ✓✓ |
| Mobile-native UI | ✓✓ | ✓✓ | ✓✓ | - | ✓ | ✓✓ | ✓ | ✓✓ |
+| Vessel registry / boat profile | ✓* | - | ✓* | ✓ | ✓* | - | ✓ | ✓✓ |
+| Crew management | - | - | - | - | - | - | - | ✓✓ |
+| Device thermal alarm | - | - | - | - | - | - | - | ✓✓ |
✓✓ = strong, ✓ = present, ✓* = via plugin/limited, - = absent
+### Feature Implementation Status (as of 2026-04-22)
+
+| Feature | Status | Location |
+|--------------------------------------|---------------|-----------------------------------------------|
+| GPS navigation (position, SOG, COG) | ✅ Complete | `gps/GpsProvider`, `gps/DeviceGpsProvider` |
+| NMEA 0183 parsing | ✅ Complete | `nmea/NmeaParser`, `nmea/AisVdmParser` |
+| AIS target tracking + CPA/TCPA | ✅ Complete | `ais/AisRepository`, `ais/CpaCalculator` |
+| AIS internet feed (AISHub) | ✅ Complete | `ais/AisHubApiService`, `ais/AisHubSource` |
+| MOB alarm | ✅ Complete | `ui/MobHandler`, `ui/safety/SafetyFragment` |
+| Anchor alarm + watch circle | ✅ Complete | `AnchorAlarmManager`, `ui/AnchorWatchHandler` |
+| Trip track recording | ✅ Complete | `track/TrackRepository`, `ui/MapHandler` |
+| Weather overlay (particle wind) | ✅ Complete | `ui/map/ParticleWindView` |
+| Barometric pressure trend | ✅ Complete | `BarometerSensorManager`, `BarometerTrendView`|
+| Performance / polar tracking | ✅ Complete | `PerformanceViewModel`, `PolarData` |
+| Tidal harmonic prediction | ✅ Complete | `tide/HarmonicTideCalculator` |
+| Isochrone weather routing | ✅ Complete | `routing/IsochroneRouter` |
+| Trip logbook (voice + manual) | ✅ Complete | `logbook/`, `ui/voicelog/` |
+| GRIB weather file management | ✅ Complete | `data/storage/GribFileManager` |
+| Vessel registry + crew management | ✅ Complete | `vessel/VesselRepository`, `ui/vessel/` |
+| Device thermal alarm | ✅ Complete | `thermal/ThermalMonitor` |
+| Night mode | 🔲 Roadmap | Phase 1 (partial — theme exists) |
+| Cloud sync | 🔲 Roadmap | Phase 4 |
+| Satellite GRIB (Iridium) | 🔲 Roadmap | Phase 5 |
+| Wearable companion (Wear OS) | 🔲 Roadmap | Phase 5 |
+
### Gaps in Existing Solutions
| Gap | Who suffers | Our answer |
@@ -86,6 +114,8 @@ Existing solutions force sailors to switch between a charting app, a weather app
| Tide apps are standalone, not integrated with charts | Coastal cruisers | Tide/current overlays on the chart |
| Anchor alarms require separate apps | All anchoring sailors| Built-in anchor watch with configurable alerts|
| No good offline weather routing on mobile | Offshore sailors | Offline GRIB processing + isochrone routing |
+| No app tracks crew roster with roles + contacts | All skippers | Built-in crew registry, no third-party needed |
+| No app warns about phone overheating at the helm | All mobile users | Battery temp + PowerManager thermal alarm |
---
diff --git a/.agent/worklog.md b/.agent/worklog.md
index 7a4467f..4818a94 100644
--- a/.agent/worklog.md
+++ b/.agent/worklog.md
@@ -140,6 +140,25 @@ Section 7.3 AIS display — COMPLETE (2026-03-15): AIS integrated into ViewModel
- `activity_main.xml`: `fab_record_track` FAB anchored top|end of bottom nav
- `drawable/ic_track_record.xml`: red dot record icon
+### [APPROVED] Vessel Registry + Crew Management (2026-04-22)
+- `android-app/app/src/main/kotlin/org/terst/nav/vessel/Vessel.kt` — data class: name, MMSI, callsign, flag, homePort, hullType, LOA, beam, draft, displacement, engineHp, notes, isOwnVessel
+- `android-app/app/src/main/kotlin/org/terst/nav/vessel/CrewMember.kt` — data class: name, role (SKIPPER/FIRST_MATE/WATCH_CAPTAIN/CREW/GUEST), emergencyContact, emergencyPhone, certifications, notes
+- `android-app/app/src/main/kotlin/org/terst/nav/vessel/VesselRepository.kt` — in-memory CRUD for vessels and crew; addVessel, updateVessel, removeVessel, getOwnVessel, addCrewMember, updateCrewMember, removeCrewMember, getSkipper, getCrewByRole
+- `android-app/app/src/main/res/layout/fragment_vessel_registry.xml` — NestedScrollView with own vessel card, crew list, and known vessels list; + ADD buttons for crew and fleet
+- `android-app/app/src/main/kotlin/org/terst/nav/ui/vessel/VesselRegistryFragment.kt` — fragment with AlertDialog editors for vessels and crew; long-press to delete
+- `android-app/app/src/main/res/menu/bottom_nav_menu.xml` — added `nav_vessel` 5th tab with `ic_vessel` icon
+- `android-app/app/src/main/res/drawable/ic_vessel.xml` — sailboat silhouette vector icon
+- `MainViewModel.kt` — added `vesselRepository` property (public, for fragment access)
+- `MainActivity.kt` — `R.id.nav_vessel` case loads `VesselRegistryFragment`
+- Mirror classes in `test-runner/src/main/kotlin/org/terst/nav/vessel/`
+- 18 tests in `test-runner/src/test/kotlin/org/terst/nav/vessel/VesselRepositoryTest.kt` — all GREEN
+
+### [APPROVED] Thermal Alarm (2026-04-22)
+- `android-app/app/src/main/kotlin/org/terst/nav/thermal/ThermalMonitor.kt` — `thermalFlow(context)` as Kotlin Flow using `Intent.ACTION_BATTERY_CHANGED` for battery temperature; `PowerManager.addThermalStatusListener` on API 29+ for supplemental state; emits distinct `ThermalReading` only on state change
+- `ThermalState` enum: OK (<40°C), WARM (40–45°C), HOT (45–50°C), CRITICAL (>50°C)
+- `MainViewModel.kt` — `thermalState: StateFlow<ThermalState>`, `thermalReading: StateFlow<ThermalReading?>`, `onThermalReading()` entry point
+- `MainActivity.kt` — `startThermalMonitoring()` called from `observeDataSources()`; HOT triggers Toast + alarm sound (reuses `R.raw.mob_alarm`); CRITICAL triggers urgent Toast + alarm; OK/WARM stops alarm; alarm released in `onDestroy()`
+
## Next 3 Specific Steps
1. **Persist track to GPX/Room** — export recorded track as GPX file or store in Room DB
2. **Track stats in Log tab** — show elapsed time, distance, avg SOG while recording