Conversation
|
@codex review |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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
AISCommfor exposing current and historical AIS payloads on nodes. - Adds AIS-related tests, fixtures, documentation, and the
ais-lib-messagesdependency.
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
9d3eede to
c2e530d
Compare
Head branch was pushed to by a user without write access
|
@codex review |
There was a problem hiding this comment.
💡 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") |
There was a problem hiding this comment.
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 👍 / 👎.
| "AISDecoder should accept dates from resource names" { | ||
| AISDecoder.parsePayload("\n\n", "ais-20260515.nmea") shouldBe emptyList() |
3d404b6 to
77513f2
Compare
a01fff4 to
c756e62
Compare
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`
|



No description provided.