diff --git a/data/target_ships/target_ship_1.json b/data/target_ships/target_ship_1.json index f1c730b..be1b53a 100644 --- a/data/target_ships/target_ship_1.json +++ b/data/target_ships/target_ship_1.json @@ -4,8 +4,7 @@ "width": 20, "height": 8, "speedMax": 17, - "mmsi": 257845600, - "name": "BASTO IV", + "name": "BASTO", "shipType": "Passenger/Ro-Ro Cargo Ship" } -} +} \ No newline at end of file diff --git a/data/target_ships/target_ship_2.json b/data/target_ships/target_ship_2.json index 96b4eda..456ca81 100644 --- a/data/target_ships/target_ship_2.json +++ b/data/target_ships/target_ship_2.json @@ -4,8 +4,7 @@ "width": 10, "height": 8, "speedMax": 15, - "mmsi": 257083180, "name": "CANOLE", "shipType": "Cargo" } -} +} \ No newline at end of file diff --git a/data/target_ships/target_ship_3.json b/data/target_ships/target_ship_3.json index dbf5408..e22d3bd 100644 --- a/data/target_ships/target_ship_3.json +++ b/data/target_ships/target_ship_3.json @@ -4,8 +4,7 @@ "width": 30, "height": 30, "speedMax": 21, - "mmsi": 219945000, "name": "BASTO VI", "shipType": "Passenger/Ro-Ro Cargo Ship" } -} +} \ No newline at end of file diff --git a/src/trafficgen/types.py b/src/trafficgen/types.py index a168c58..8a12874 100644 --- a/src/trafficgen/types.py +++ b/src/trafficgen/types.py @@ -1,10 +1,10 @@ """Domain specific data types used in trafficgen.""" from enum import Enum -from typing import List, Union +from typing import List, Optional, Union from uuid import UUID -from pydantic import BaseModel +from pydantic import BaseModel, Field def to_camel(string: str) -> str: @@ -99,7 +99,7 @@ class ShipStatic(BaseModel): width: float height: float speed_max: float - mmsi: int + mmsi: Optional[int] = Field(None, ge=100000000, le=999999999, description="Maritime Mobile Service Identity (MMSI)", examples=[123456789]) name: str ship_type: GeneralShipType