Skip to content

Conversation

@tomarnepedersen
Copy link
Collaborator

  • Added sog to each waypoint leg. Updated documentation. Generated new baseline_situations_generated files. Updated types.
  • Fixed bug where future position of target ship was used instead of initial position of target ship to check encounter evolvement. Updated documentation to make this functionality clearer.
  • Added option to pass in a single input situation .json file, not only a folder.

StephanieKemna and others added 21 commits October 29, 2025 12:45
…ial ownship position and location of encounter
Add cli options: added option to read in a single situation file, added option to set ownship coordinate lat,lon as commandline argument, updated/extended README with testing instructions, added section to README on Contributing, fixed pydantic warning on definition of path_type, and added new tests for above functionality (single situation file, lat-lon argument).
…e-encounter-has-evolved-initial-position-of-the-target-ship-should-be-used-instead-of-the-future-position

Resolves #77, fixed bug, encounter evolvement is using initial position of target ship.
…points-in-generated-traffic-situation

Resolves #78 - Adding sog to waypoint legs for all vessels.
Copy link
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 SOG (Speed Over Ground) to waypoint legs, fixes a critical bug in encounter evolution checking, and enables passing a single .json file as input instead of requiring a folder.

Key changes:

  • Added sog field to waypoint Leg type and populated it throughout the codebase
  • Fixed bug where future target ship position was incorrectly used instead of initial position for encounter evolution validation
  • Added support for reading single .json situation files (not just folders)

Reviewed changes

Copilot reviewed 72 out of 74 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/trafficgen/types.py Added sog field to Leg class; modified path_type default behavior
src/trafficgen/encounter.py Fixed target ship position bug (line 190); added SOG to waypoint legs; added ownship coordinate override logic
src/trafficgen/read_files.py Refactored to support single .json file input; extracted file reading logic
src/trafficgen/ship_traffic_generator.py Added ownship coordinate CLI parameter with validation
src/trafficgen/write_traffic_situation_to_file.py Added unit conversion for leg SOG from m/s to knots
src/trafficgen/cli.py Added --ownship-coordinate option; improved help text
tests/test_trafficgen.py Added test for ownship coordinate override feature
tests/test_read_files.py Added test for single file reading
tests/conftest.py Added situations_file fixture; fixed docstring typo
docs/source/*.rst Clarified documentation for encounter evolution and added SOG examples
pyproject.toml, CITATION.cff Version bump to 0.8.4; added Stephanie Kemna to contributors
CHANGELOG.md Documented changes in version 0.8.4
README.md Added comprehensive contributing guidelines
data/baseline_situations_generated/*.json Regenerated 55 baseline files with version 0.8.3→0.8.4 and added SOG to legs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

testers = [
{ name = "Grunde Løvoll", email = "Grunde.Lovoll@dnv.com" },
{ name = "Stephanie Kemna", email = "Stephanie.Kemna@dnv.com" },
{ name = "Stephanie Kemna"},
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Missing email address for Stephanie Kemna in the testers list, while it was present in the removed line. This creates an inconsistency in the contributor information.

Copilot uses AI. Check for mistakes.
Comment on lines 233 to 238
Field(
default=PathType.RTZ,
description=(
"Specifies the control-point model (e.g., Bezier, RTZ) "
"used to define the path for the ship to follow."
),
),
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

The field path_type is missing from the Field() constructor where the default was previously set with default=PathType.RTZ. Moving the default to the field definition without keeping it in the Field() can change validation behavior. The removed line should be restored: default=PathType.RTZ,

Copilot uses AI. Check for mistakes.
{ name = "Tom Arne Pedersen", email = "Tom.Arne.Pedersen@dnv.com" },
{ name = "Claas Rostock", email = "Claas.Rostock@dnv.com" },
{ name = "Minos Hemrich", email = "Minos.Hemrich@dnv.com" },
{ name = "Stephanie Kemna"}
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Missing email address for Stephanie Kemna in the authors list. The other authors have email addresses specified, so this should be consistent.

Copilot uses AI. Check for mistakes.
@tomarnepedersen
Copy link
Collaborator Author

Review allready done on dev branch

@tomarnepedersen tomarnepedersen merged commit 8e5a5e8 into main Nov 26, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants