Skip to content

feat(maps): add native AIS data support and AISComm NodeProperty#5369

Open
DanySK wants to merge 15 commits into
masterfrom
feat/ais
Open

feat(maps): add native AIS data support and AISComm NodeProperty#5369
DanySK wants to merge 15 commits into
masterfrom
feat/ais

Conversation

@DanySK
Copy link
Copy Markdown
Member

@DanySK DanySK commented May 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 13:08
@DanySK DanySK enabled auto-merge (squash) May 27, 2026 13:08
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented May 27, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 357616c667

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds native AIS/NMEA trace support to alchemist-maps, integrating vessel data into the existing GPS trace loading, deployment, and movement pipeline, plus a new AIS node property and documentation.

Changes:

  • Adds AIS decoding, AIS-to-GPSTrace conversion, and GPX export utilities.
  • Introduces AISComm for exposing current and historical AIS payloads on nodes.
  • Adds AIS-related tests, fixtures, documentation, and the ais-lib-messages dependency.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
alchemist-maps/build.gradle.kts Adds AIS library API dependency and publication developer metadata.
gradle/libs.versions.toml Defines AIS library version and catalog alias.
alchemist-maps/src/main/kotlin/it/unibo/alchemist/boundary/gps/loaders/AISLoader.kt Adds AIS file loader for trace conversion.
alchemist-maps/src/main/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/AISDecoder.kt Adds AIS/NMEA decoding utilities.
alchemist-maps/src/main/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/AISPayload.kt Adds decoded AIS payload model and conversion helpers.
alchemist-maps/src/main/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/AISGPXConverter.kt Adds AIS-to-GPX export helper.
alchemist-maps/src/main/kotlin/it/unibo/alchemist/model/maps/properties/AISComm.kt Adds AIS node property with optional history retention.
alchemist-maps/src/main/java/it/unibo/alchemist/model/maps/actions/ReproduceGPSTrace.java Reformats constructor delegation.
alchemist-maps/src/test/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/TestAISDecoder.kt Adds decoder tests.
alchemist-maps/src/test/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/TestAISLoader.kt Adds AIS loader trace conversion tests.
alchemist-maps/src/test/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/TestAISPayload.kt Adds AIS payload conversion tests.
alchemist-maps/src/test/kotlin/it/unibo/alchemist/boundary/gps/loaders/ais/TestAISGPXConverter.kt Adds GPX export tests.
alchemist-maps/src/test/kotlin/it/unibo/alchemist/model/maps/properties/TestAISComm.kt Adds AISComm behavior tests.
site/content/howtos/simulation/deploy/gps/_index.md Documents AIS/NMEA trace support.
src/test/resources/website-snippets/ais-trace.yml Adds documentation snippet for AIS trace simulations.
src/test/resources/ais/ais-20260515.nmea Adds example AIS/NMEA fixture for documentation.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.53%. Comparing base (46d0ee8) to head (96c92c0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5369   +/-   ##
=========================================
  Coverage     61.53%   61.53%           
  Complexity       14       14           
=========================================
  Files             2        2           
  Lines            78       78           
  Branches          4        4           
=========================================
  Hits             48       48           
  Misses           24       24           
  Partials          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DanySK DanySK force-pushed the feat/ais branch 4 times, most recently from 9d3eede to c2e530d Compare May 27, 2026 22:53
auto-merge was automatically disabled May 28, 2026 10:31

Head branch was pushed to by a user without write access

Copilot finished work on behalf of DanySK May 28, 2026 10:32
@DanySK DanySK requested a review from Copilot May 28, 2026 10:32
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented May 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59fa349fde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

when {
line.startsWith(DATE_TIME_PREFIX) -> {
val time = line.substringAfter(DATE_TIME_PREFIX).trim()
currentTimestamp = Instant.parse("${payloadDate}T${time}Z")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Advance date after midnight time markers

When an AIS resource spans midnight, e.g. !DATE-TIME,23:59:59 followed later by !DATE-TIME,00:00:01, this always combines each marker with the original file date, so the post-midnight packets are timestamped almost 24 hours earlier than the preceding packets. Those payloads are then sorted by timestamp when traces are built, which reorders the vessel path and can make the simulation replay the track with a large backward jump instead of continuing into the next day.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment on lines +18 to +19
"AISDecoder should accept dates from resource names" {
AISDecoder.parsePayload("\n\n", "ais-20260515.nmea") shouldBe emptyList()
Copilot finished work on behalf of DanySK May 28, 2026 11:23
@DanySK DanySK force-pushed the feat/ais branch 8 times, most recently from 3d404b6 to 77513f2 Compare May 29, 2026 14:23
@DanySK DanySK force-pushed the feat/ais branch 3 times, most recently from a01fff4 to c756e62 Compare May 29, 2026 17:37
lolloantonioli and others added 15 commits May 31, 2026 04:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…FileFormatException` with the original exception as cause so malformed AIS resources are reported consistently with the `GPSFileLoader` contract.
`AISNavigationStatus`
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants