diff --git a/.github/workflows/_code_quality.yml b/.github/workflows/_code_quality.yml index 04613ac..1ff62cc 100644 --- a/.github/workflows/_code_quality.yml +++ b/.github/workflows/_code_quality.yml @@ -15,7 +15,7 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Install ruff - run: pip install ruff==0.3.0 + run: pip install ruff==0.4.2 - name: Run ruff format run: ruff format --diff . @@ -31,24 +31,7 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Install ruff - run: pip install ruff==0.3.0 + run: pip install ruff==0.4.2 - name: Run ruff check run: ruff check --diff . - pyright: - runs-on: ubuntu-latest - name: pyright - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' # cache pip dependencies - - name: Install dependencies - run: | - pip install -r requirements.txt - pip install pytest - - name: Install pyright - run: pip install pyright==1.1.352 - - name: Run pyright - run: pyright . diff --git a/.github/workflows/_publish_package.yml b/.github/workflows/_publish_package.yml deleted file mode 100644 index 7c547fe..0000000 --- a/.github/workflows/_publish_package.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Publish Package to pypi - -on: workflow_call - -jobs: - publish: - name: Publish package - runs-on: ubuntu-latest - environment: release - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v3 - with: - name: artifact - path: ./dist/ - - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/_publish_package_test.yml b/.github/workflows/_publish_package_test.yml deleted file mode 100644 index 0a3d7b9..0000000 --- a/.github/workflows/_publish_package_test.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Publish Package to testpypi - -on: workflow_call - -jobs: - publish: - name: Publish package - runs-on: ubuntu-latest - environment: release - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v3 - with: - name: artifact - path: ./dist/ - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index f37ac2c..8d2e2fd 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -10,13 +10,21 @@ jobs: build_package: uses: ./.github/workflows/_build_package.yml publish_package: + name: Publish package needs: - build_package - uses: ./.github/workflows/_publish_package.yml - # publish_package_test: - # needs: - # - build_package - # uses: ./.github/workflows/_publish_package_test.yml + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: artifact + path: dist + - uses: pypa/gh-action-pypi-publish@release/v1 + # with: # Uncomment this line to publish to testpypi + # repository-url: https://test.pypi.org/legacy/ # Uncomment this line to publish to testpypi merge_into_release: uses: ./.github/workflows/_merge_into_release.yml secrets: diff --git a/.vscode/settings.json b/.vscode/settings.json index 949c946..77f7a94 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "python.terminal.activateEnvInCurrentTerminal": true, "python.languageServer": "Pylance", "editor.formatOnSave": true, "notebook.formatOnSave.enabled": true, @@ -28,4 +27,6 @@ "python.analysis.inlayHints.functionReturnTypes": false, "python.analysis.inlayHints.pytestParameters": true, "python.terminal.executeInFileDir": true, -} \ No newline at end of file + "python.terminal.activateEnvironment": true, + "python.terminal.activateEnvInCurrentTerminal": false, +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a53b538..c018e07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,17 @@ All notable changes to the [maritime-schema] project will be documented in this file.
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [0.0.7] - 2025-02-17 + - Final Release. This project has merged with ship-traffic-gen + +### Changed +- VS Code settings: Turned off automatic venv activation +- replaced black formatter with ruff formatter +- src/maritime_schema/types/caga.py: Allow own_ship and target_ships to take a Ship object as input ## [0.0.6] - 2024-04-04 ### Changed - - Updated README.md with a getting started section. - examples: Added examples using `types.caga` classes in the examples folder. - src/maritime_schema/types/caga.py: A number of classes were changed from optional to required. diff --git a/README.md b/README.md index 0675453..f30a17d 100644 --- a/README.md +++ b/README.md @@ -1,395 +1,6 @@ -# maritime-schema +## Notice -Python package containing data classes and corresponding JSON schemata for common types used in generating traffic scenarios and testing of autonomous navigation systems. +This project has been merged with [ship-traffic-gen](https://github.com/dnv-opensource/ship-traffic-generator). The python types that were part of this package are now maintained in [types.py](https://github.com/dnv-opensource/ship-traffic-generator/blob/main/src/trafficgen/types.py) as part of ship-traffic-gen. -The data classes in the package are implemented as data models using the [pydantic](https://docs.pydantic.dev/) framework.
-All data classes reside in subpackage `maritime_schema.types.caga` and can be imported from there. -## Installation - -```sh -pip install maritime-schema -``` - -## Getting Started - -### Creating an Input Schema File (Traffic Situation) - -This section will guide you through the process of creating a traffic situation using this package. - -#### Creating a Ship - -Let's start by defining static information relating to a ship - information which will not change during the scenario. This includes things such as length, the ship type, name, and MMSI and IMO numbers. We will define static information using the `ShipStatic` class. - -- Each ship must have a unique `id`, in the form of a UUID. For this, the `uuid` module from the standard library can be used. -- The `GeneralShipType` class lists several general ship types, similar to those found in AIS. -- Note that some of these fields (such as MMSI & IMO) can be left as `None`, as not all ships are required to have this data. - -```py -from maritime_schema.types.caga import ShipStatic, GeneralShipType -from uuid import uuid4 - -my_own_ship_static = ShipStatic( - id=uuid4(), - length=200, width=30, height=10, - ship_type=GeneralShipType.FISHING, - speed_max=20, - name="Starfish 2", - mmsi=None, imo=None, -) -``` - -Next, we can define the initial conditions for this ship, using the `Initial` and `Position` classes. - -The `AISNavStatus` class is used to set the `nav_status` of the ship. This contains several navigational statuses from AIS. - -```py -from maritime_schema.types.caga import Initial, Position, AISNavStatus - -initial_state = Initial( - position=Position(latitude=58.61, longitude=10.59), - sog=10, cog=100, heading=200, - nav_status=AISNavStatus.UNDER_WAY_USING_ENGINE -) - -``` - -Now, let's put it all together into an `OwnShip` object. An `OwnShip` has static information, an initial state, and could also have waypoints. However, in this simple example, waypoints will be set to `None`. - -```py -from maritime_schema.types.caga import OwnShip - -own_ship = OwnShip(static=my_own_ship_static, initial=initial_state, waypoints=None) - -``` - -The exact same process can be used to create target ships. However, instead of using the `OwnShip` class, the `TargetShip` class. should be used. - -#### Creating the Traffic Situation - -Let's put the `own_ship` we just created into a traffic situation. - -```py -import datetime -from maritime_schema.types.caga import TrafficSituation - -traffic_situation = TrafficSituation( - title="example situation", - description="an example traffic situation generated using the maritime-schema python package", - start_time=datetime.datetime.now(), - own_ship=own_ship, - target_ships=[], - environment=None, -) -``` - -If we now want to save this traffic situation to a file, we simply call `traffic_situation.model_dump_json(by_alias=True)`. - -**IMPORTANT:** Always use `by_alias=True` when using `model_dump_json`, otherwise the output won't comply with the maritime-schema. - -```py -traffic_situation_json = traffic_situation.model_dump_json(by_alias=True, indent=4) - -with open("traffic_situation.json", "w") as f: - _ = f.write(traffic_situation_json) -``` - -Let's see the output: - -```JSON -{ - "title": "example situation", - "description": "an example traffic situation generated using the python package maritime-schema", - "startTime": "2024-04-03T14:13:21.756135", - "ownShip": { - "static": { - "id": "14c94b5f-00ee-4c30-97c9-507862915076", - "length": 200.0, - "width": 30.0, - "height": 10.0, - "speedMax": 20.0, - "mmsi": null, - "imo": null, - "name": "Starfish 2", - "shipType": "Fishing" - }, - "initial": { - "position": { - "latitude": 58.61, - "longitude": 10.59 - }, - "sog": 10.0, - "cog": 100.0, - "heading": 200.0, - "navStatus": "Under way using engine" - }, - "waypoints": [ - { - "position": { - "latitude": 58.61, - "longitude": 10.59 - }, - "turnRadius": null, - "data": null - }, - { - "position": { - "latitude": 58.594299006647965, - "longitude": 10.759356798943921 - }, - "turnRadius": null, - "data": null - } - ] - }, - "targetShips": [], - "environment": null -} -``` - -A valid scenario in JSON format has been created! - -### Creating an Output Schema File - -Creating output schema files is similar to creating traffic situations, however, some additional classes are required. - -#### Caga Configuration - -Let's start by creating a caga configuration. -_Note: additional properties about the configuration can be added by adding extra keyword arguments._ - -```py -from maritime_schema.types.caga import CagaConfiguration -caga_configuration = CagaConfiguration(name="CAGA System 1", vendor="VendorABC", version="1.2.3") -``` - -#### Route (Event Data) - -Next we will create the route. A route is simply a list of waypoint objects. In this example, we are also adding speed data for each leg to the route. - -The `m_before_leg_change`, `m_after_leg_change`, and `interp_method` can be set to none. These properties are only used if the route shall also contain information about how the ship speed changes _between_ legs. In this example, we will assume instantaneous speed changes between legs. - -```py -from maritime_schema.types.caga import DataPoint, Data, Waypoint, Position - -# Each route leg should have an associated speed. -wp1_sog_data = DataPoint(value=10, m_after_leg_change=0, m_before_leg_change=0, interp_method=None) -wp2_sog_data = DataPoint(value=10, m_after_leg_change=0, m_before_leg_change=0, interp_method=None) - -# The sog data is added to a Data class. -wp1_data = Data(sog=wp1_sog_data) # type: ignore -wp2_data = Data(sog=wp2_sog_data) # type: ignore - -# Create the individual waypoints. -wp1 = Waypoint(position=Position(latitude=1, longitude=1), turn_radius=100, data=wp1_data) -wp2 = Waypoint(position=Position(latitude=1.1, longitude=1.2), turn_radius=None, data=wp2_data) - -new_route = [wp1, wp2] -``` - -With the route created, we can now add this to a `CagaEvent`. Then the `CagaEvent` can be added to `CagaData`. - -`CagaData` contains all the caga-related data. This can include multiple `CagaEvents` (in cases where the proposed route by the system changes over time). - -```py -from maritime_schema.types.caga import CagaEvent, CagaData -import datetime - -# create the event - a route was generated -event_1 = CagaEvent(time=datetime.datetime.now(), route=new_route, calculation_time=1.32) - -# add the event to caga_data -caga_data = CagaData(configuration=caga_configuration, time_series_data=[], event_data=[event_1]) - -``` - -#### Time series data - -In addition, it is also possible to add time series data to `CagaData` under the `time_series_data` section. This should be used if the system is collecting information (e.g. Target information) at a regular time interval. Let's add some time series data to our `CagaData` object in this example: - -```py -from uuid import uuid4 -from maritime_schema.types.caga import DetectedShip, CagaTimeStep, AISNavStatus, EncounterType -detected_ship_1_t1 = DetectedShip( - id=uuid4(), - position=Position(latitude=1.23, longitude=1.24), - sog=2.31, - cog=11, - heading=10, - nav_status=AISNavStatus.ENGAGED_IN_FISHING, - encounter_type=EncounterType.HEAD_ON, - colreg_rules_applied=[], - distance_to_target=1023.21, - dcpa=100, - tcpa=121, - predictions=None, -) - -detected_ship_1_t2 = DetectedShip( - id=uuid4(), - position=Position(latitude=1.231, longitude=1.242), - sog=2.31, - cog=11, - heading=9, - nav_status=AISNavStatus.ENGAGED_IN_FISHING, - encounter_type=EncounterType.HEAD_ON, - colreg_rules_applied=[], - distance_to_target=1023.21, - dcpa=100, - tcpa=121, - predictions=None, -) - -time_step_0 = CagaTimeStep(time=datetime.datetime.now(), target_ships=[detected_ship_1_t1], internal_status={"cpu_temp": 55}) -time_step_1 = CagaTimeStep( - time=datetime.datetime.now() + datetime.timedelta(seconds=1), - target_ships=[detected_ship_1_t2], - internal_status={"cpu_temp": 57}, -) -``` - -#### CagaData & Output Schema - -Now that we have created both `EventData` and `TimeSeriesData` let's add them to `CagaData`. Then, we will create an `OutputSchema`. The process of saving the `OutputSchema` to a file is the same as for the `TrafficSituation`; using `output_schema.model_dump_json(by_alias=True)` - -```py -from maritime_schema.types.caga import CagaData -caga_data = CagaData(configuration=caga_configuration, time_series_data=[time_step_0, time_step_1], event_data=[event_1]) - -# include the original traffic situation in the output file, in this example, we will load it from a file -with open("traffic_situation.json", "r") as f: - data = f.read() -traffic_situation = TrafficSituation.model_validate_json(data) - -# create the output_schema -output_schema = OutputSchema( - creation_time=datetime.datetime.now(), - traffic_situation=traffic_situation, - caga_data=caga_data, - simulation_data=None, -) - -# serialize the output_schema as a json string -output_schema_file_json = output_schema.model_dump_json(by_alias=True, indent=4) - -# save the json string to a file -with open("output_schema_file.json", "w") as f: - _ = f.write(output_schema_file_json) -``` - -## Development Setup - -1. Install Python 3.9 or higher, i.e. [Python 3.10](https://www.python.org/downloads/release/python-3104/) or [Python 3.11](https://www.python.org/downloads/release/python-3114/) - -2. Update pip and setuptools: - - ```sh - python -m pip install --upgrade pip setuptools - ``` - -3. git clone the maritime-schema repository into your local development directory: - - ```sh - git clone https://github.com/dnv-opensource/maritime-schema path/to/your/dev/maritime-schema - ``` - -4. In the maritime-schema root folder: - - Create a Python virtual environment: - - ```sh - python -m venv .venv - ``` - - Activate the virtual environment: - - ..on Windows: - - ```sh - > .venv\Scripts\activate.bat - ``` - - ..on Linux: - - ```sh - source .venv/bin/activate - ``` - - Update pip and setuptools: - - ```sh - (.venv) $ python -m pip install --upgrade pip setuptools - ``` - - Install maritime-schema's dependencies: - - ```sh - (.venv) $ pip install -r requirements-dev.txt - ``` - - This should return without errors. - - Finally, install maritime-schema itself, yet not as a regular package but as an _editable_ package instead, using the pip install option -e: - - ```sh - (.venv) $ pip install -e . - ``` - -5. Test that the installation works (in the maritime-schema root folder): - - ```sh - (.venv) $ pytest . - ``` - -### Development Usage Example - -**Note: This section is only relevant if you plan to modify the maritime-schema!** - -API: - -```py -from maritime_schema.types import ... -``` - -CLI: - -The JSON schemata are contained in the repository in folder ./schema -If you did not clone the repository but installed the maritime-schema package as a dependency in your project you can call `publish-schema` on the command line to (re-)generate the schemata: - -```sh -publish-schema -``` - -The `publish-schema` command will generate the JSON schemata in `(current working directory)/schema`
-and a corresponding html documentation of the schemata in `(current working directory)/docs/schema` - -_For more examples and usage, please refer to maritime-schema's [documentation][maritime_schema_docs]._ - -## Meta - -Copyright (c) 2024 [DNV](https://www.dnv.com) AS. All rights reserved. - -Minos Hemrich - minos.hemrich@dnv.com - -Tom Arne Pedersen - tom.arne.pedersen@dnv.com - -Claas Rostock - [@LinkedIn](https://www.linkedin.com/in/claasrostock/?locale=en_US) - claas.rostock@dnv.com - -Distributed under the MIT license. See [LICENSE](LICENSE.md) for more information. - -[https://github.com/dnv-opensource/maritime-schema](https://github.com/dnv-opensource/maritime-schema) - -## Contributing - -1. Fork it () -2. Create your branch (`git checkout -b my-branch-name`) -3. Commit your changes (`git commit -am 'place a descriptive commit message here'`) -4. Push to the branch (`git push origin my-branch-name`) -5. Create a new Pull Request in GitHub - -For your contribution, please make sure you follow the [STYLEGUIDE](STYLEGUIDE.md) before creating the Pull Request. - - - -[maritime_schema_docs]: https://dnv-opensource.github.io/maritime-schema/README.html diff --git a/diagram.png b/diagram.png new file mode 100644 index 0000000..f2fda7a Binary files /dev/null and b/diagram.png differ diff --git a/docs/schema/caga/input_schema.html b/docs/schema/caga/input_schema.html index ae08127..0c6708e 100644 --- a/docs/schema/caga/input_schema.html +++ b/docs/schema/caga/input_schema.html @@ -1,7 +1,139 @@ Test Input Schema

Test Input Schema

Type: object

Title

Type: string Default: null

The title of the traffic situation


Example:

"overtaking_18"
 

Description

Default: null

A description of the traffic situation

Type: string
Type: null

Example:

"Crossing situation with 3 target vessels in the Oslofjord"
-

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-04T15:28:16.125239"
-

Own Ship data

Type: object

Own Ship data


Example:

{
+

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-25T15:24:53.443647"
+

Own Ship data


Own Ship data

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+    "height": 15.0,
+    "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+    "imo": 1000001,
+    "length": 230.0,
+    "mmsi": 123456789,
+    "name": "RMS Titanic",
+    "shipType": "Fishing",
+    "speedMax": 20.0,
+    "width": 30.0
+}
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+    "latitude": 57.2343,
+    "longitude": 10.3432
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+    "cog": 284.2,
+    "heading": 283.1,
+    "navStatus": "Under way using engine",
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "sog": 12.3
+}
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+    "latitude": 51.2123,
+    "longitude": 11.2313
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+    "data": {
+        "heading": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        },
+        "sog": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        }
+    },
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "turnRadius": 500.0
+}
+
Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+    "height": 15.0,
+    "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+    "imo": 1000001,
+    "length": 230.0,
+    "mmsi": 123456789,
+    "name": "RMS Titanic",
+    "shipType": "Fishing",
+    "speedMax": 20.0,
+    "width": 30.0
+}
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+    "latitude": 57.2343,
+    "longitude": 10.3432
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+    "cog": 284.2,
+    "heading": 283.1,
+    "navStatus": "Under way using engine",
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "sog": 12.3
+}
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+    "latitude": 51.2123,
+    "longitude": 11.2313
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+    "data": {
+        "heading": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        },
+        "sog": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        }
+    },
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "turnRadius": 500.0
+}
+

Example:

{
     "initial": {
         "cog": 284.2,
         "heading": 283.1,
@@ -47,7 +179,7 @@
         }
     ]
 }
-

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+

Target Ship data

Type: array Default: null

Target Ship data

No Additional Items

Each item of this array must be:


Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
     "imo": 1000001,
@@ -58,24 +190,24 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"c8067411-76fe-421d-a60e-07b30948fdd3"
-

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
-

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
-

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
-

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
-

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
-

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
     "latitude": 57.2343,
     "longitude": 10.3432
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
-

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
-

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
-

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
     "cog": 284.2,
     "heading": 283.1,
     "navStatus": "Under way using engine",
@@ -85,14 +217,14 @@
     },
     "sog": 12.3
 }
-

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
-

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
     "data": {
         "heading": {
             "interpMethod": "linear",
@@ -113,7 +245,7 @@
     },
     "turnRadius": 500.0
 }
-

Target Ship data

Type: array Default: null

Target Ship data

No Additional Items

Each item of this array must be:

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+
Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
     "imo": 1000001,
@@ -124,24 +256,24 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"c8067411-76fe-421d-a60e-07b30948fdd3"
-

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
-

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
-

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
-

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
-

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
-

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
     "latitude": 57.2343,
     "longitude": 10.3432
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
-

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
-

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
-

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
     "cog": 284.2,
     "heading": 283.1,
     "navStatus": "Under way using engine",
@@ -151,14 +283,14 @@
     },
     "sog": 12.3
 }
-

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
-

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
     "data": {
         "heading": {
             "interpMethod": "linear",
@@ -179,7 +311,7 @@
     },
     "turnRadius": 500.0
 }
-

Example:

[
+

Example:

[
     {
         "initial": {
             "cog": 284.2,
@@ -255,4 +387,4 @@
     "windDirection": 180.0,
     "windSpeed": 10.0
 }
-

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file +

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file diff --git a/docs/schema/caga/output_schema.html b/docs/schema/caga/output_schema.html index b892567..01a4a42 100644 --- a/docs/schema/caga/output_schema.html +++ b/docs/schema/caga/output_schema.html @@ -1,8 +1,140 @@ - Test Output Schema

Test Output Schema

Type: object

This is a JSON schema for result data originating from Collision and Grounding Avoidance systems

Creationtime

Type: stringFormat: date-time

Date and Time that this file was created, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ. This should be the simulation end time.


Example:

"2024-04-04T15:28:16.148176"
+ Test Output Schema 

Test Output Schema

Type: object

This is a JSON schema for result data originating from Collision and Grounding Avoidance systems

Creationtime

Type: stringFormat: date-time

Date and Time that this file was created, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ. This should be the simulation end time.


Example:

"2024-04-25T15:24:53.458501"
 

Default: null

The traffic situation that was simulated (input file). This should remain unmofidied.

Type: object

Title

Type: string Default: null

The title of the traffic situation


Example:

"overtaking_18"
 

Description

Default: null

A description of the traffic situation

Type: string
Type: null

Example:

"Crossing situation with 3 target vessels in the Oslofjord"
-

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-04T15:28:16.125239"
-

Own Ship data

Type: object

Own Ship data


Example:

{
+

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-25T15:24:53.443647"
+

Own Ship data


Own Ship data

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+    "height": 15.0,
+    "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+    "imo": 1000001,
+    "length": 230.0,
+    "mmsi": 123456789,
+    "name": "RMS Titanic",
+    "shipType": "Fishing",
+    "speedMax": 20.0,
+    "width": 30.0
+}
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+    "latitude": 57.2343,
+    "longitude": 10.3432
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+    "cog": 284.2,
+    "heading": 283.1,
+    "navStatus": "Under way using engine",
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "sog": 12.3
+}
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+    "latitude": 51.2123,
+    "longitude": 11.2313
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+    "data": {
+        "heading": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        },
+        "sog": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        }
+    },
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "turnRadius": 500.0
+}
+
Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+    "height": 15.0,
+    "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+    "imo": 1000001,
+    "length": 230.0,
+    "mmsi": 123456789,
+    "name": "RMS Titanic",
+    "shipType": "Fishing",
+    "speedMax": 20.0,
+    "width": 30.0
+}
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+    "latitude": 57.2343,
+    "longitude": 10.3432
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+    "cog": 284.2,
+    "heading": 283.1,
+    "navStatus": "Under way using engine",
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "sog": 12.3
+}
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+    "latitude": 51.2123,
+    "longitude": 11.2313
+}
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+    "data": {
+        "heading": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        },
+        "sog": {
+            "interpMethod": "linear",
+            "mAfterLegChange": 100.0,
+            "mBeforeLegChange": 100.0,
+            "value": 12.3
+        }
+    },
+    "position": {
+        "latitude": 57.2343,
+        "longitude": 10.3432
+    },
+    "turnRadius": 500.0
+}
+

Example:

{
     "initial": {
         "cog": 284.2,
         "heading": 283.1,
@@ -48,7 +180,7 @@
         }
     ]
 }
-

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+

Target Ship data

Type: array Default: null

Target Ship data

No Additional Items

Each item of this array must be:


Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
     "imo": 1000001,
@@ -59,24 +191,24 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"c8067411-76fe-421d-a60e-07b30948fdd3"
-

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
-

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
-

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
-

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
-

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
-

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
     "latitude": 57.2343,
     "longitude": 10.3432
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
-

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
-

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
-

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
     "cog": 284.2,
     "heading": 283.1,
     "navStatus": "Under way using engine",
@@ -86,14 +218,14 @@
     },
     "sog": 12.3
 }
-

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
-

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
     "data": {
         "heading": {
             "interpMethod": "linear",
@@ -114,7 +246,7 @@
     },
     "turnRadius": 500.0
 }
-

Target Ship data

Type: array Default: null

Target Ship data

No Additional Items

Each item of this array must be:

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
+
Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
     "imo": 1000001,
@@ -125,24 +257,24 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"c8067411-76fe-421d-a60e-07b30948fdd3"
-

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
-

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
-

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
-

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
-

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
-

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
-

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
+

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
+

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
+

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Speedmax

Default: null

Maximum speed of the ship in knots

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
+

Mmsi

Default: null

Maritime Mobile Service Identity (MMSI)

Type: integer

Value must be greater or equal to 100000000 and lesser or equal to 999999999

Type: null

Example:

123456789
+

Imo

Default: null

IMO Number

Type: integer

Value must be greater or equal to 1000000 and lesser or equal to 9999999

Type: null

Example:

1234567
+

Name

Default: null

Ship name

Type: string
Type: null

Example:

"RMS Titanic"
+

Default: null

General ship type, based on AIS

Type: enum (of string)

Must be one of:

  • "Wing in ground"
  • "Fishing"
  • "Towing"
  • "Dredging or underwater ops"
  • "Diving ops"
  • "Military ops"
  • "Sailing"
  • "Pleasure Craft"
  • "High speed craft"
  • "Pilot Vessel"
  • "Search and Rescue vessel"
  • "Tug"
  • "Port Tender"
  • "Anti-pollution"
  • "Law Enforcement"
  • "Medical Transport"
  • "Noncombatant ship"
  • "Passenger"
  • "Cargo"
  • "Tanker"
  • "Other Type"
Type: null

Additional Properties of any type are allowed.

Type: object

Default: null

Type: object

Type: object Default: null

Initial longitude and latitude of the ship.


Example:

{
     "latitude": 57.2343,
     "longitude": 10.3432
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
-

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
-

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
-

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number Default: null

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number Default: null

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Type: number Default: null

Initial ship heading in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null
Type: null

Example:

{
     "cog": 284.2,
     "heading": 283.1,
     "navStatus": "Under way using engine",
@@ -152,14 +284,14 @@
     },
     "sog": 12.3
 }
-

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
+

Waypoints

Default: null

An array of Waypoint objects. Each waypoint object must have a position property.
If no turn radius is provided, it will be assumed to be 0.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
-

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Turnradius

Default: null

Orthodrome turn radius as defined in RTZ format

Type: number
Type: null

Example:

200
+

Default: null

A Data object that includes speed, course, and heading data points

Type: object

Each additional property must conform to the following schema

Type: object

The 'data' field can include additional properties. All additional properties should be DataPoint objects.

Type: number

Type: number

Type: number

Type: string
Type: null
Type: null

Example:

{
     "data": {
         "heading": {
             "interpMethod": "linear",
@@ -180,7 +312,7 @@
     },
     "turnRadius": 500.0
 }
-

Example:

[
+

Example:

[
     {
         "initial": {
             "cog": 284.2,
@@ -266,55 +398,55 @@
 

Type: number

Time given in seconds to the navigator / system, before the proposed manoeuver is no longer able to be excecuted


Example:

20
 

Type: number

Minimum safety depth


Example:

30
 

Type: number

If automatic maneuver acceptance is enabled, the new route will be activated after a specified number of seconds


Example:

20
-

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Type: array

Time series data from the system

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-04T15:28:16.135180"
-

Targetships

Type: array

list of target ships detected by the CAGA system

No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"44febc4b-3376-42d7-9573-1ddfcdea77a2"
-

Type: object

A geographical coordinate


Example:

{
+

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Default: null

Time series data from the system

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.452102"
+

Targetships

Type: array

list of target ships detected by the CAGA system

No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"4b97a108-d1eb-4ae7-b37a-88e2c5183f61"
+

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
 }
-

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
-

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
-

Additional Properties of any type are allowed.

Type: object

Sog

Type: number

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
-

Cog

Type: number

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
-

Heading

Default: null

Initial ship heading in degrees

Type: number

Value must be greater or equal to 0.0 and lesser or equal to 360.0

Type: null

Example:

45.2
-

Type: enum (of string) Default: null

AIS Navigational Status

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"

Default: null

COLREG encounter type

Type: enum (of string)

Must be one of:

  • "Overtaking stand-on"
  • "Overtaking give-way"
  • "Head-on"
  • "Crossing give-way"
  • "Crossing stand-on"
  • "No Risk"
Type: null

Example:

"Overtaking stand-on"
-

Colregrulesapplied

Type: array of integer Default: null

COLREG rules the system is applying to the vessel. Each item in the list must be of type int corresponding to the COLREG rule number

No Additional Items

Each item of this array must be:

Type: integer

Example:

[
+

Latitude

Type: number Default: null

WGS-84 latitude

Value must be greater or equal to -90.0 and lesser or equal to 90.0


Example:

51.2131
+

Longitude

Type: number Default: null

WGS-84 longitude

Value must be greater or equal to -180.0 and lesser or equal to 180.0


Example:

11.2131
+

Additional Properties of any type are allowed.

Type: object

Sog

Type: number

Initial ship speed over ground in knots

Value must be greater or equal to 0.0


Example:

10.0
+

Cog

Type: number

Initial ship course over ground in degrees

Value must be greater or equal to 0.0 and lesser or equal to 360.0


Example:

45.0
+

Heading

Default: null

Initial ship heading in degrees

Type: number

Value must be greater or equal to 0.0 and lesser or equal to 360.0

Type: null

Example:

45.2
+

Default: null

AIS Navigational Status

Type: enum (of string)

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"
Type: null

Default: null

COLREG encounter type

Type: enum (of string)

Must be one of:

  • "Overtaking stand-on"
  • "Overtaking give-way"
  • "Head-on"
  • "Crossing give-way"
  • "Crossing stand-on"
  • "No Risk"
Type: null

Example:

"Overtaking stand-on"
+

Colregrulesapplied

Default: null

COLREG rules the system is applying to the vessel. Each item in the list must be of type int corresponding to the COLREG rule number

Type: array of integer
No Additional Items

Each item of this array must be:

Type: integer
Type: null

Example:

[
     16,
     17
 ]
-

Distancetotarget

Type: number Default: null

Calculated distance from the own ship to the target vessel


Example:

1900.2
-

Dcpa

Default: null

Calculated closest point of approach

Type: number
Type: null

Example:

100.3
-

Tcpa

Default: null

calculated time to closest point of approach in seconds

Type: number
Type: null

Example:

2131
-

Predictions

Default: null

List of predicted future values. This can be used to store data like a predicted path for each target vessel. The value field supports both numbers and objects

Type: object

Each additional property must conform to the following schema

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-04T15:28:16.129205"
-

Value


Value of the prediction

Type: number
Type: object

Examples:

{
+

Distancetotarget

Default: null

Calculated distance from the own ship to the target vessel

Type: number
Type: null

Example:

1900.2
+

Dcpa

Default: null

Calculated closest point of approach

Type: number
Type: null

Example:

100.3
+

Tcpa

Default: null

calculated time to closest point of approach in seconds

Type: number
Type: null

Example:

2131
+

Predictions

Default: null

List of predicted future values. This can be used to store data like a predicted path for each target vessel. The value field supports both numbers and objects

Type: object

Each additional property must conform to the following schema

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.447183"
+

Value


Value of the prediction

Type: number
Type: object

Examples:

{
     "latitude": 57.2343,
     "longitude": 10.3432
 }
-
100
-
Type: null

Example:

[
+
100
+
Type: null

Example:

[
     {
-        "time": "2024-04-04T15:28:16.130246",
+        "time": "2024-04-25T15:24:53.448050",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
         }
     },
     {
-        "time": "2024-04-04T15:28:16.130262",
+        "time": "2024-04-25T15:24:53.448064",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
         }
     },
     {
-        "time": "2024-04-04T15:28:16.130269",
+        "time": "2024-04-25T15:24:53.448069",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
         }
     }
 ]
-

Additional Properties of any type are allowed.

Type: object

Example:

[
+

Additional Properties of any type are allowed.

Type: object

Example:

[
     {
         "cog": 181.0,
         "colregRulesApplied": [
@@ -333,21 +465,21 @@
         "predictions": {
             "position": [
                 {
-                    "time": "2024-04-04T15:28:16.135228",
+                    "time": "2024-04-25T15:24:53.452140",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
                     }
                 },
                 {
-                    "time": "2024-04-04T15:28:16.135237",
+                    "time": "2024-04-25T15:24:53.452147",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
                     }
                 },
                 {
-                    "time": "2024-04-04T15:28:16.135243",
+                    "time": "2024-04-25T15:24:53.452152",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
@@ -359,7 +491,7 @@
         "tcpa": 1200.0
     }
 ]
-

Internalstatus

Type: object Default: null

Dictionary containing additional internal information about the system (health, status..)


Example:

[
+

Internalstatus

Type: object Default: null

Dictionary containing additional internal information about the system (health, status..)

Type: null

Example:

[
     {
         "internalStatus": null,
         "targetShips": [
@@ -381,21 +513,21 @@
                 "predictions": {
                     "position": [
                         {
-                            "time": "2024-04-04T15:28:16.141020",
+                            "time": "2024-04-25T15:24:53.454897",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
                             }
                         },
                         {
-                            "time": "2024-04-04T15:28:16.141044",
+                            "time": "2024-04-25T15:24:53.454903",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
                             }
                         },
                         {
-                            "time": "2024-04-04T15:28:16.141064",
+                            "time": "2024-04-25T15:24:53.454907",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
@@ -407,10 +539,10 @@
                 "tcpa": 1200.0
             }
         ],
-        "time": "2024-04-04T15:28:16.140981"
+        "time": "2024-04-25T15:24:53.454884"
     }
 ]
-

Eventdata

Type: array Default: null

Event data from the system

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-04T15:28:16.136594"
+

Eventdata

Type: array Default: null

Event data from the system

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.453323"
 

Route

Type: array Default: null

Planned CAGA Route

No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -551,7 +683,7 @@
                 "turnRadius": 500.0
             }
         ],
-        "time": "2024-04-04T15:28:16.141188"
+        "time": "2024-04-25T15:24:53.454964"
     }
 ]
 
Type: null

Example:

{
@@ -628,7 +760,7 @@
                     "turnRadius": 500.0
                 }
             ],
-            "time": "2024-04-04T15:28:16.148333"
+            "time": "2024-04-25T15:24:53.458602"
         }
     ],
     "timeSeriesData": [
@@ -653,21 +785,21 @@
                     "predictions": {
                         "position": [
                             {
-                                "time": "2024-04-04T15:28:16.148295",
+                                "time": "2024-04-25T15:24:53.458576",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
                                 }
                             },
                             {
-                                "time": "2024-04-04T15:28:16.148304",
+                                "time": "2024-04-25T15:24:53.458583",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
                                 }
                             },
                             {
-                                "time": "2024-04-04T15:28:16.148310",
+                                "time": "2024-04-25T15:24:53.458587",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
@@ -679,7 +811,7 @@
                     "tcpa": 1200.0
                 }
             ],
-            "time": "2024-04-04T15:28:16.148277"
+            "time": "2024-04-25T15:24:53.458565"
         }
     ]
 }
@@ -691,8 +823,8 @@
 

Name

Type: string

The name of the system


Example:

"AutoNavigation-System 1"
 

Vendor

Type: string

The name of the system vendor


Example:

"CompanyABC"
 

Version

Type: string

The software version


Example:

"1.2.3"
-

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Type: array

TimeSeries data originating from the Simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-04T15:28:16.144585"
-

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"8e8120b8-b87f-4fae-8632-e17f4c535c73"
+

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Type: array

TimeSeries data originating from the Simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.456463"
+

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b"
 

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -704,7 +836,7 @@
 

ship heading

Default: null

Initial ship heading in degrees

Type: number

Value must be greater or equal to 0.0 and lesser or equal to 360.0

Type: null

Example:

45.2
 

Type: enum (of string)

AIS Navigational Status

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"

Acceleration

Type: number Default: null

Ship acceleration in ms^-2


Example:

0.01
 

Rateofturn

Type: number Default: null

Ship rate of turn in deg/s


Example:

1.8
-

Additional Properties of any type are allowed.

Type: object

Targetships

Type: array
No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"8e8120b8-b87f-4fae-8632-e17f4c535c73"
+

Additional Properties of any type are allowed.

Type: object

Targetships

Type: array
No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b"
 

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -759,7 +891,7 @@
                 "sog": 10.0
             }
         ],
-        "time": "2024-04-04T15:28:16.146312"
+        "time": "2024-04-25T15:24:53.457395"
     },
     {
         "ownShip": {
@@ -803,10 +935,10 @@
                 "sog": 10.0
             }
         ],
-        "time": "2024-04-04T15:28:16.146397"
+        "time": "2024-04-25T15:24:53.457433"
     }
 ]
-

Eventdata

Type: array Default: null

Event data from the simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-04T15:28:16.139551"
+

Eventdata

Type: array Default: null

Event data from the simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.454371"
 

Additional Properties of any type are allowed.

Type: object
Type: null

Example:

{
     "configuration": {
         "name": "AutoNavigation-System 1",
@@ -857,7 +989,7 @@
                     "sog": 10.0
                 }
             ],
-            "time": "2024-04-04T15:28:16.148436"
+            "time": "2024-04-25T15:24:53.458674"
         },
         {
             "ownShip": {
@@ -901,8 +1033,8 @@
                     "sog": 10.0
                 }
             ],
-            "time": "2024-04-04T15:28:16.148473"
+            "time": "2024-04-25T15:24:53.458701"
         }
     ]
 }
-

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file +

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 17187c2..9450781 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,11 +1,11 @@ -pytest>=7.4 -pytest-cov>=4.1 -ruff==0.3.0 -pyright==1.1.352 -Sphinx>=7.2 -sphinx-argparse-cli>=1.11 -myst-parser>=2.0 -furo>=2023.9.10 -sourcery==1.15 +pytest>=8.2 +pytest-cov>=5.0 +ruff==0.4.2 +pyright==1.1.360 +Sphinx>=7.3 +sphinx-argparse-cli>=1.15 +myst-parser>=3.0 +furo>=2024.4 +sourcery==1.16 -r requirements.txt diff --git a/schema/caga/input_schema.json b/schema/caga/input_schema.json index f085e7f..f25ed99 100644 --- a/schema/caga/input_schema.json +++ b/schema/caga/input_schema.json @@ -454,6 +454,96 @@ "title": "PrecipitationType", "type": "string" }, + "Ship": { + "properties": { + "static": { + "allOf": [ + { + "$ref": "#/$defs/ShipStatic" + } + ], + "default": null, + "description": "Static ship information which does not change during a scenario.", + "examples": [ + { + "height": 15.0, + "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", + "imo": 1000001, + "length": 230.0, + "mmsi": 123456789, + "name": "RMS Titanic", + "shipType": "Fishing", + "speedMax": 20.0, + "width": 30.0 + } + ] + }, + "initial": { + "anyOf": [ + { + "$ref": "#/$defs/Initial" + }, + { + "type": "null" + } + ], + "default": null, + "examples": [ + { + "cog": 284.2, + "heading": 283.1, + "navStatus": "Under way using engine", + "position": { + "latitude": 57.2343, + "longitude": 10.3432 + }, + "sog": 12.3 + } + ] + }, + "waypoints": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/Waypoint" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An array of `Waypoint` objects. Each waypoint object must have a `position` property.
If no turn radius is provided, it will be assumed to be `0`.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status ", + "examples": [ + { + "data": { + "heading": { + "interpMethod": "linear", + "mAfterLegChange": 100.0, + "mBeforeLegChange": 100.0, + "value": 12.3 + }, + "sog": { + "interpMethod": "linear", + "mAfterLegChange": 100.0, + "mBeforeLegChange": 100.0, + "value": 12.3 + } + }, + "position": { + "latitude": 57.2343, + "longitude": 10.3432 + }, + "turnRadius": 500.0 + } + ], + "title": "Waypoints" + } + }, + "title": "Ship", + "type": "object" + }, "ShipStatic": { "additionalProperties": true, "description": "Static ship data that will not change during the scenario.", @@ -461,7 +551,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "c8067411-76fe-421d-a60e-07b30948fdd3" + "3455074c-ddcf-4a1e-aef0-03001b2331e3" ], "format": "uuid", "title": "Id", @@ -795,14 +885,17 @@ "default": null, "description": "Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-04T15:28:16.125239" + "2024-04-25T15:24:53.443647" ], "title": "Starttime" }, "ownShip": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/OwnShip" + }, + { + "$ref": "#/$defs/Ship" } ], "description": "Own Ship data", @@ -910,7 +1003,14 @@ ] ], "items": { - "$ref": "#/$defs/TargetShip" + "anyOf": [ + { + "$ref": "#/$defs/TargetShip" + }, + { + "$ref": "#/$defs/Ship" + } + ] }, "title": "Target Ship data", "type": "array" diff --git a/schema/caga/output_schema.json b/schema/caga/output_schema.json index a0fbf59..9aeb05d 100644 --- a/schema/caga/output_schema.json +++ b/schema/caga/output_schema.json @@ -87,6 +87,18 @@ ] }, "timeSeriesData": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CagaTimeStep" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "description": "Time series data from the system", "examples": [ [ @@ -111,21 +123,21 @@ "predictions": { "position": [ { - "time": "2024-04-04T15:28:16.141020", + "time": "2024-04-25T15:24:53.454897", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.141044", + "time": "2024-04-25T15:24:53.454903", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.141064", + "time": "2024-04-25T15:24:53.454907", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -137,15 +149,11 @@ "tcpa": 1200.0 } ], - "time": "2024-04-04T15:28:16.140981" + "time": "2024-04-25T15:24:53.454884" } ] ], - "items": { - "$ref": "#/$defs/CagaTimeStep" - }, - "title": "Timeseriesdata", - "type": "array" + "title": "Timeseriesdata" }, "eventData": { "default": null, @@ -219,7 +227,7 @@ "turnRadius": 500.0 } ], - "time": "2024-04-04T15:28:16.141188" + "time": "2024-04-25T15:24:53.454964" } ] ], @@ -231,8 +239,7 @@ } }, "required": [ - "configuration", - "timeSeriesData" + "configuration" ], "title": "CagaData", "type": "object" @@ -252,7 +259,7 @@ ], "description": "Date and Time of the event", "examples": [ - "2024-04-04T15:28:16.136594" + "2024-04-25T15:24:53.453323" ], "title": "Time" }, @@ -366,7 +373,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-04T15:28:16.135180" + "2024-04-25T15:24:53.452102" ], "title": "Time" }, @@ -392,21 +399,21 @@ "predictions": { "position": [ { - "time": "2024-04-04T15:28:16.135228", + "time": "2024-04-25T15:24:53.452140", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.135237", + "time": "2024-04-25T15:24:53.452147", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.135243", + "time": "2024-04-25T15:24:53.452152", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -522,7 +529,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "44febc4b-3376-42d7-9573-1ddfcdea77a2" + "4b97a108-d1eb-4ae7-b37a-88e2c5183f61" ], "format": "uuid", "title": "Id", @@ -580,9 +587,12 @@ "title": "Heading" }, "navStatus": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/AISNavStatus" + }, + { + "type": "null" } ], "default": null, @@ -604,6 +614,17 @@ ] }, "colregRulesApplied": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], "default": null, "description": "COLREG rules the system is applying to the vessel. Each item in the list must be of type `int` corresponding to the COLREG rule number", "examples": [ @@ -612,20 +633,23 @@ 17 ] ], - "items": { - "type": "integer" - }, - "title": "Colregrulesapplied", - "type": "array" + "title": "Colregrulesapplied" }, "distanceToTarget": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], "default": null, "description": "Calculated distance from the own ship to the target vessel", "examples": [ 1900.2 ], - "title": "Distancetotarget", - "type": "number" + "title": "Distancetotarget" }, "dcpa": { "anyOf": [ @@ -679,21 +703,21 @@ "examples": [ [ { - "time": "2024-04-04T15:28:16.130246", + "time": "2024-04-25T15:24:53.448050", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.130262", + "time": "2024-04-25T15:24:53.448064", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.130269", + "time": "2024-04-25T15:24:53.448069", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -1093,7 +1117,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-04T15:28:16.129205" + "2024-04-25T15:24:53.447183" ], "title": "Time" }, @@ -1122,6 +1146,96 @@ "title": "PredictedPoint", "type": "object" }, + "Ship": { + "properties": { + "static": { + "allOf": [ + { + "$ref": "#/$defs/ShipStatic" + } + ], + "default": null, + "description": "Static ship information which does not change during a scenario.", + "examples": [ + { + "height": 15.0, + "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", + "imo": 1000001, + "length": 230.0, + "mmsi": 123456789, + "name": "RMS Titanic", + "shipType": "Fishing", + "speedMax": 20.0, + "width": 30.0 + } + ] + }, + "initial": { + "anyOf": [ + { + "$ref": "#/$defs/Initial" + }, + { + "type": "null" + } + ], + "default": null, + "examples": [ + { + "cog": 284.2, + "heading": 283.1, + "navStatus": "Under way using engine", + "position": { + "latitude": 57.2343, + "longitude": 10.3432 + }, + "sog": 12.3 + } + ] + }, + "waypoints": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/Waypoint" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An array of `Waypoint` objects. Each waypoint object must have a `position` property.
If no turn radius is provided, it will be assumed to be `0`.
Additional data can be added to each waypoint leg. This allows varying parameters on a per-leg basis, such as speed and heading, or navigational status ", + "examples": [ + { + "data": { + "heading": { + "interpMethod": "linear", + "mAfterLegChange": 100.0, + "mBeforeLegChange": 100.0, + "value": 12.3 + }, + "sog": { + "interpMethod": "linear", + "mAfterLegChange": 100.0, + "mBeforeLegChange": 100.0, + "value": 12.3 + } + }, + "position": { + "latitude": 57.2343, + "longitude": 10.3432 + }, + "turnRadius": 500.0 + } + ], + "title": "Waypoints" + } + }, + "title": "Ship", + "type": "object" + }, "ShipStatic": { "additionalProperties": true, "description": "Static ship data that will not change during the scenario.", @@ -1129,7 +1243,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "c8067411-76fe-421d-a60e-07b30948fdd3" + "3455074c-ddcf-4a1e-aef0-03001b2331e3" ], "format": "uuid", "title": "Id", @@ -1266,7 +1380,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "8e8120b8-b87f-4fae-8632-e17f4c535c73" + "3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b" ], "format": "uuid", "title": "Id", @@ -1423,7 +1537,7 @@ "sog": 10.0 } ], - "time": "2024-04-04T15:28:16.146312" + "time": "2024-04-25T15:24:53.457395" }, { "ownShip": { @@ -1467,7 +1581,7 @@ "sog": 10.0 } ], - "time": "2024-04-04T15:28:16.146397" + "time": "2024-04-25T15:24:53.457433" } ] ], @@ -1508,7 +1622,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-04T15:28:16.144585" + "2024-04-25T15:24:53.456463" ], "title": "Time" }, @@ -1546,7 +1660,7 @@ ], "description": "Date and Time of the event", "examples": [ - "2024-04-04T15:28:16.139551" + "2024-04-25T15:24:53.454371" ], "title": "Time" } @@ -1725,14 +1839,17 @@ "default": null, "description": "Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-04T15:28:16.125239" + "2024-04-25T15:24:53.443647" ], "title": "Starttime" }, "ownShip": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/OwnShip" + }, + { + "$ref": "#/$defs/Ship" } ], "description": "Own Ship data", @@ -1840,7 +1957,14 @@ ] ], "items": { - "$ref": "#/$defs/TargetShip" + "anyOf": [ + { + "$ref": "#/$defs/TargetShip" + }, + { + "$ref": "#/$defs/Ship" + } + ] }, "title": "Target Ship data", "type": "array" @@ -1959,7 +2083,7 @@ "creationTime": { "description": "Date and Time that this file was created, in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`. This should be the simulation end time.", "examples": [ - "2024-04-04T15:28:16.148176" + "2024-04-25T15:24:53.458501" ], "format": "date-time", "title": "Creationtime", @@ -2063,7 +2187,7 @@ "turnRadius": 500.0 } ], - "time": "2024-04-04T15:28:16.148333" + "time": "2024-04-25T15:24:53.458602" } ], "timeSeriesData": [ @@ -2088,21 +2212,21 @@ "predictions": { "position": [ { - "time": "2024-04-04T15:28:16.148295", + "time": "2024-04-25T15:24:53.458576", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.148304", + "time": "2024-04-25T15:24:53.458583", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-04T15:28:16.148310", + "time": "2024-04-25T15:24:53.458587", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -2114,7 +2238,7 @@ "tcpa": 1200.0 } ], - "time": "2024-04-04T15:28:16.148277" + "time": "2024-04-25T15:24:53.458565" } ] } @@ -2182,7 +2306,7 @@ "sog": 10.0 } ], - "time": "2024-04-04T15:28:16.148436" + "time": "2024-04-25T15:24:53.458674" }, { "ownShip": { @@ -2226,7 +2350,7 @@ "sog": 10.0 } ], - "time": "2024-04-04T15:28:16.148473" + "time": "2024-04-25T15:24:53.458701" } ] } diff --git a/src/maritime_schema/types/caga.py b/src/maritime_schema/types/caga.py index e68aab2..fdabbc3 100644 --- a/src/maritime_schema/types/caga.py +++ b/src/maritime_schema/types/caga.py @@ -362,12 +362,12 @@ class TrafficSituation(BaseModelConfig): description="Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", examples=[datetime.now()], ) - own_ship: OwnShip = Field( + own_ship: Union[OwnShip, Ship] = Field( title="Own Ship data", description="Own Ship data", examples=[create_ship_example()], ) - target_ships: List[TargetShip] = Field( + target_ships: List[Union[TargetShip, Ship]] = Field( None, title="Target Ship data", description="Target Ship data", @@ -472,17 +472,17 @@ class DetectedShip(BaseModelConfig): examples=[45.0], ) heading: Optional[float] = Field(None, ge=0, le=360, description="Initial ship heading in degrees", examples=[45.2]) - nav_status: AISNavStatus = Field(None, description="AIS Navigational Status") + nav_status: Optional[AISNavStatus] = Field(None, description="AIS Navigational Status") encounter_type: Optional[EncounterType] = Field( None, description="COLREG encounter type", examples=["Overtaking stand-on"] ) - colreg_rules_applied: List[int] = Field( + colreg_rules_applied: Optional[List[int]] = Field( None, description="COLREG rules the system is applying to the vessel. Each item in the list must be of type `int` corresponding to the COLREG rule number", examples=[[16, 17]], ) - distance_to_target: float = Field( + distance_to_target: Optional[float] = Field( None, description="Calculated distance from the own ship to the target vessel", examples=[1900.2], @@ -538,10 +538,10 @@ class SimulatedShip(BaseModelConfig): description="Initial ship heading in degrees", examples=[45.2], ) - nav_status: AISNavStatus = Field(..., description="AIS Navigational Status") + nav_status: Optional[AISNavStatus] = Field(None, description="AIS Navigational Status") - acceleration: float = Field(None, description="Ship acceleration in `ms^-2`", examples=[0.01]) - rate_of_turn: float = Field(None, description="Ship rate of turn in `deg/s`", examples=[1.8]) + acceleration: Optional[float] = Field(None, description="Ship acceleration in `ms^-2`", examples=[0.01]) + rate_of_turn: Optional[float] = Field(None, description="Ship rate of turn in `deg/s`", examples=[1.8]) model_config = ConfigDict(json_schema_extra={"additionalProperties": True}) @@ -589,39 +589,39 @@ class SimulatorEvent(BaseModelConfig): class CagaData(BaseModelConfig): - configuration: CagaConfiguration = Field( - ..., description="System Configuration", examples=[create_caga_config_example()] + configuration: Optional[CagaConfiguration] = Field( + None, description="System Configuration", examples=[create_caga_config_example()] ) - time_series_data: List[CagaTimeStep] = Field( - ..., + time_series_data: Optional[List[CagaTimeStep]] = Field( + None, description="Time series data from the system", examples=[[create_caga_time_frame_example()]], ) - event_data: List[CagaEvent] = Field( + event_data: Optional[List[CagaEvent]] = Field( None, description="Event data from the system", examples=[[create_caga_event_example()]], ) -class SimulationTimeFrame(BaseModelConfig): +class SimulationTimeStep(BaseModelConfig): time: Union[datetime, int] = Field( ..., description="Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", examples=[datetime.now()], ) own_ship: SimulatedShip - target_ships: List[SimulatedShip] + target_ships: Optional[List[SimulatedShip]] class SimulationData(BaseModelConfig): - configuration: SoftwareConfig = Field( - ..., + configuration: Optional[SoftwareConfig] = Field( + None, description="Simulator software configuration", examples=[create_software_config_example()], ) - time_series_data: List[SimulationTimeFrame] = Field( - ..., + time_series_data: Optional[List[SimulationTimeStep]] = Field( + None, description="TimeSeries data originating from the Simulator", examples=[ [ @@ -630,7 +630,7 @@ class SimulationData(BaseModelConfig): ] ], ) - event_data: List[SimulatorEvent] = Field(None, description="Event data from the simulator") + event_data: Optional[List[SimulatorEvent]] = Field(None, description="Event data from the simulator") class OutputSchema(BaseModelConfig): diff --git a/src/maritime_schema/types/caga_examples.py b/src/maritime_schema/types/caga_examples.py index 380df2d..db96f43 100644 --- a/src/maritime_schema/types/caga_examples.py +++ b/src/maritime_schema/types/caga_examples.py @@ -205,9 +205,9 @@ def create_caga_data_example(): def create_simulation_timeframe_example(): - from maritime_schema.types.caga import SimulationTimeFrame + from maritime_schema.types.caga import SimulationTimeStep - return SimulationTimeFrame( + return SimulationTimeStep( time=datetime.now(), own_ship=create_simulated_ship_example(), target_ships=[create_simulated_ship_example(), create_simulated_ship_example()], diff --git a/tox.ini b/tox.ini index 69d423a..cda7617 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,7 @@ skip_covered = True [testenv] system_site_packages = True deps = - pytest>=7.4 - pytest-cov>=4.1 + pytest>=8.2 + pytest-cov>=5.0 commands = pytest --cov --cov-config tox.ini {posargs}