<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nav.git/android-app/app/src/main/kotlin/org/terst/nav/ais, branch main</title>
<subtitle>nav — android navigation app
</subtitle>
<id>https://git.terst.org/nav.git/atom?h=main</id>
<link rel='self' href='https://git.terst.org/nav.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/'/>
<updated>2026-04-22T09:02:46+00:00</updated>
<entry>
<title>fix+feat: CI build fixes and hardware source feature flags</title>
<updated>2026-04-22T09:02:46+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-04-22T09:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=e141e1ef46ebb2a61f452122201a77527a5a1c9e'/>
<id>urn:sha1:e141e1ef46ebb2a61f452122201a77527a5a1c9e</id>
<content type='text'>
CI fixes:
- ParticleWindView: bounds.lonEast → bounds.northEast.longitude
  (MapLibre 13.x API; lonEast not available as property)
- VesselRegistryFragment: Vessel(id="") and CrewMember(id="") →
  include required name="" so copy() compiles

Hardware source feature flags:
- HardwareSource enum: AIS_RECEIVER, NMEA_INSTRUMENTS
- FeatureFlags: SharedPreferences-backed; all sources default OFF
  (app works phone-only out of the box)
- NavApplication: exposes featureFlags singleton
- SafetyFragment: "HARDWARE DATA SOURCES" card with two MaterialSwitch
  toggles; reads initial state from FeatureFlags; calls
  SafetyListener.onHardwareSourceChanged on change
- AIS_RECEIVER flag:
  - MainViewModel.processAisSentence() / refreshAisFromInternet() skip
    when disabled; onHardwareSourceChanged() clears targets + cpaAlerts
- NMEA_INSTRUMENTS flag:
  - LocationService skips nmeaStreamManager.start() on service launch
    when disabled
  - New ACTION_START_NMEA / ACTION_STOP_NMEA intents allow live toggle
  - MainActivity.onHardwareSourceChanged() sends the appropriate intent

Tests: 102 total, all GREEN (+7 FeatureFlagsTest)

https://claude.ai/code/session_011h2dXbgXg3PesQMmQUNTCW
</content>
</entry>
<entry>
<title>feat: CPA/TCPA collision alerts and live track stats</title>
<updated>2026-04-22T08:45:55+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-04-22T08:45:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=87f9cb753da3325d13fdbc442d526567e056d6e1'/>
<id>urn:sha1:87f9cb753da3325d13fdbc442d526567e056d6e1</id>
<content type='text'>
CPA/TCPA alerts:
- CpaAlert data class with severity (CAUTION/WARNING/DANGER) and label()
- CpaThresholds: 0.5/1.0/2.0 nm, max TCPA 30 min
- MainViewModel.updateCpaAlerts() runs on every GPS update and AIS
  sentence; skips stationary contacts; filters TCPA ≤ 0 or &gt; 30 min;
  sorts by TCPA ascending
- SafetyFragment: new COLLISION AVOIDANCE card shows live alert list,
  color-coded by severity; clears to "No traffic alerts" when safe
- MainActivity: observes cpaAlerts → safetyFragment.updateCpaAlerts()

Track stats:
- TrackStats data class: distanceNm, durationMs, avgSogKnots,
  durationFormatted (m:ss / h:mm:ss)
- TrackRepository.haversineNm() + computeStats() using point timestamps
- MainViewModel exposes trackStats StateFlow, cleared on stopTrack()
- activity_main: dark pill overlay bar (tv_track_stats) above map
- MainActivity: shows "● REC  0.00nm  m:ss  x.xkt avg" while recording

Tests: 95 total, all GREEN (+16 new — 9 TrackStats, 7 CpaAlert)

https://claude.ai/code/session_011h2dXbgXg3PesQMmQUNTCW
</content>
</entry>
<entry>
<title>feat: integrate AIS into ViewModel and MapFragment with vessel symbol layer</title>
<updated>2026-03-15T14:20:21+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator</email>
</author>
<published>2026-03-15T14:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=ff5854b75f2ba7c77d467fd9523e2a23060a7c46'/>
<id>urn:sha1:ff5854b75f2ba7c77d467fd9523e2a23060a7c46</id>
<content type='text'>
- MainViewModel: add _aisTargets StateFlow, processAisSentence(), refreshAisFromInternet()
- AisRepository: add ingestVessel() for internet-sourced vessels
- MapFragment: add AIS vessel SymbolLayer with heading-based rotation and zoom-gated labels
- MainActivity: add startAisHardwareFeed() TCP stub, wire viewModel
- ic_ship_arrow.xml: new vector drawable for AIS target icons
- MainViewModelTest: 3 new AIS tests (processAisSentence happy path, dedup, non-AIS sentence)
- JVM test harness: /tmp/ais-vm-test-runner/ — 3 tests GREEN

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: add AIS repository, AISHub API service, and AisHubSource</title>
<updated>2026-03-15T13:13:34+00:00</updated>
<author>
<name>Claude Sonnet</name>
<email>agent@anthropic.com</email>
</author>
<published>2026-03-15T13:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=13e4e30f351f06bda23a45b36c05970d1ef2c692'/>
<id>urn:sha1:13e4e30f351f06bda23a45b36c05970d1ef2c692</id>
<content type='text'>
- AisRepository: processes NMEA sentences, upserts by MMSI, merges type-5 static data, evicts stale
- AisHubApiService + AisHubVessel: Retrofit/Moshi model for AISHub REST polling API
- AisHubSource: converts AisHubVessel REST responses to AisVessel domain objects
- 11 JUnit 5 tests all GREEN via /tmp/ais-repo-test-runner/ JVM harness

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>feat: add AIS data model, CPA calculator, and NMEA VDM parser</title>
<updated>2026-03-15T12:24:35+00:00</updated>
<author>
<name>Claudomator Agent</name>
<email>agent@claudomator</email>
</author>
<published>2026-03-15T12:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=d1de605e28bd8ac32d73420ef60235eac4c56a50'/>
<id>urn:sha1:d1de605e28bd8ac32d73420ef60235eac4c56a50</id>
<content type='text'>
- AisVessel data class (mmsi, name, callsign, lat, lon, sog, cog, heading, vesselType, timestampMs)
- CpaCalculator: flat-earth CPA/TCPA algorithm (nm, min)
- AisVdmParser: !AIVDM/!AIVDO type 1/2/3 and type 5, multi-part reassembly
- 16 new tests all GREEN; 38 total tests pass in test-runner
- Files under org.terst.nav.ais/nmea (com dir was root-owned)

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
