types.caga module#
- class maritime_schema.types.caga.BaseModelConfig#
Bases:
BaseModel
Enables the alias_generator for all cases.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Bases:
str
,Enum
- class maritime_schema.types.caga.GeneralShipType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
str
,Enum
- WING_IN_GROUND = 'Wing in ground'#
- FISHING = 'Fishing'#
- TOWING = 'Towing'#
- DREDGING_OR_UNDERWATER_OPS = 'Dredging or underwater ops'#
- DIVING_OPS = 'Diving ops'#
- MILITARY_OPS = 'Military ops'#
- SAILING = 'Sailing'#
- PLEASURE_CRAFT = 'Pleasure Craft'#
- HIGH_SPEED_CRAFT = 'High speed craft'#
- PILOT_VESSEL = 'Pilot Vessel'#
- SEARCH_AND_RESCUE_VESSEL = 'Search and Rescue vessel'#
- TUG = 'Tug'#
- PORT_TENDER = 'Port Tender'#
- ANTI_POLLUTION = 'Anti-pollution'#
- LAW_ENFORCEMENT = 'Law Enforcement'#
- MEDICAL_TRANSPORT = 'Medical Transport'#
- NONCOMBATANT_SHIP = 'Noncombatant ship'#
- PASSENGER = 'Passenger'#
- CARGO = 'Cargo'#
- TANKER = 'Tanker'#
- OTHER_TYPE = 'Other Type'#
- class maritime_schema.types.caga.InterpolationMethod(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
str
,Enum
- LINEAR = 'linear'#
- COSINE = 'cosine'#
- SMOOTHSTEP = 'smoothstep'#
- ACCELERATE = 'accelerate'#
- DECELERATE = 'decelerate'#
- ORDINAL = 'ordinal'#
- class maritime_schema.types.caga.WaveSpectra(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
- JONSWAP = 'JONSWAP'#
- PiersonMoskowitz = 'Pierson-Moskowitz'#
- Bretschneider = 'Bretschneider'#
- class maritime_schema.types.caga.WeatherCondition(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
- Clear = 'Clear'#
- Cloudy = 'Cloudy'#
- Foggy = 'Foggy'#
- Rainy = 'Rainy'#
- Snowy = 'Snowy'#
- class maritime_schema.types.caga.PrecipitationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
- None_ = 'None'#
- Rain = 'Rain'#
- Snow = 'Snow'#
- Sleet = 'Sleet'#
- Hail = 'Hail'#
- class maritime_schema.types.caga.Environment(*, airTemperature: float = None, waterRemperature: float = None, precipitation: PrecipitationType = None, windSpeed: float = None, windDirection: float = None, currentSpeed: float = None, currentDirection: float = None, waveSpectrum: WaveSpectra = None, significantWaveHeight: float = None, wavePeriod: float = None, waveDirection: float = None, visibility: float = None, conditions: WeatherCondition = None)#
Bases:
BaseModelConfig
- air_temperature: float#
- water_remperature: float#
- precipitation: PrecipitationType#
- wind_speed: float#
- wind_direction: float#
- current_speed: float#
- current_direction: float#
- wave_spectrum: WaveSpectra#
- significant_wave_height: float#
- wave_period: float#
- wave_direction: float#
- visibility: float#
- conditions: WeatherCondition#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'air_temperature': FieldInfo(annotation=float, required=False, alias='airTemperature', alias_priority=1, description='The air temperature in degrees Celsius', examples=[20.0]), 'conditions': FieldInfo(annotation=WeatherCondition, required=False, alias='conditions', alias_priority=1, description='The overall weather conditions', examples=[<WeatherCondition.Clear: 'Clear'>]), 'current_direction': FieldInfo(annotation=float, required=False, alias='currentDirection', alias_priority=1, description='The current direction in degrees', examples=[90.0]), 'current_speed': FieldInfo(annotation=float, required=False, alias='currentSpeed', alias_priority=1, description='The current speed in m/s', examples=[1.0]), 'precipitation': FieldInfo(annotation=PrecipitationType, required=False, alias='precipitation', alias_priority=1, description='The type of precipitation', examples=[<PrecipitationType.Rain: 'Rain'>]), 'significant_wave_height': FieldInfo(annotation=float, required=False, alias='significantWaveHeight', alias_priority=1, description='The significant wave height in meters', examples=[3.0]), 'visibility': FieldInfo(annotation=float, required=False, alias='visibility', alias_priority=1, description='The visibility in nautical miles', examples=[5.0]), 'water_remperature': FieldInfo(annotation=float, required=False, alias='waterRemperature', alias_priority=1, description='The water temperature in degrees Celsius', examples=[15.0]), 'wave_direction': FieldInfo(annotation=float, required=False, alias='waveDirection', alias_priority=1, description='The wave direction in degrees', examples=[270.0]), 'wave_period': FieldInfo(annotation=float, required=False, alias='wavePeriod', alias_priority=1, description='The wave period in seconds', examples=[12.0]), 'wave_spectrum': FieldInfo(annotation=WaveSpectra, required=False, alias='waveSpectrum', alias_priority=1, description='The wave spectrum', examples=[<WaveSpectra.JONSWAP: 'JONSWAP'>]), 'wind_direction': FieldInfo(annotation=float, required=False, alias='windDirection', alias_priority=1, description='The wind direction in degrees', examples=[180.0]), 'wind_speed': FieldInfo(annotation=float, required=False, alias='windSpeed', alias_priority=1, description='The wind speed in m/s', examples=[10.0])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.Position(*, latitude: float = None, longitude: float = None, **extra_data: Any)#
Bases:
BaseModelConfig
- latitude: float#
- longitude: float#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'latitude': FieldInfo(annotation=float, required=False, alias='latitude', alias_priority=1, description='WGS-84 latitude', examples=[51.2131], metadata=[Ge(ge=-90), Le(le=90)]), 'longitude': FieldInfo(annotation=float, required=False, alias='longitude', alias_priority=1, description='WGS-84 longitude', examples=[11.2131], metadata=[Ge(ge=-180), Le(le=180)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.ShipStatic(*, id: UUID, length: float = None, width: float = None, height: float | None = None, speedMax: float | None = None, mmsi: int | None = None, imo: int | None = None, name: str | None = None, shipType: GeneralShipType | None = None, **extra_data: Any)#
Bases:
BaseModelConfig
Static ship data that will not change during the scenario.
- id: UUID#
- length: float#
- width: float#
- height: float | None#
- speed_max: float | None#
- mmsi: int | None#
- imo: int | None#
- name: str | None#
- ship_type: GeneralShipType | None#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'height': FieldInfo(annotation=Union[float, NoneType], required=False, alias='height', alias_priority=1, description='Height of the ship in meters', examples=[15.0], metadata=[Gt(gt=0)]), 'id': FieldInfo(annotation=UUID, required=True, alias='id', alias_priority=1, description='Unique Identifier', examples=[UUID('ec86729d-58f2-4c60-a717-403cad2e594b')]), 'imo': FieldInfo(annotation=Union[int, NoneType], required=False, alias='imo', alias_priority=1, description='IMO Number', examples=[1234567], metadata=[Ge(ge=1000000), Le(le=9999999)]), 'length': FieldInfo(annotation=float, required=False, alias='length', alias_priority=1, description='Length of the ship in meters', examples=[230.0], metadata=[Gt(gt=0)]), 'mmsi': FieldInfo(annotation=Union[int, NoneType], required=False, alias='mmsi', alias_priority=1, description='Maritime Mobile Service Identity (MMSI)', examples=[123456789], metadata=[Ge(ge=100000000), Le(le=999999999)]), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, alias='name', alias_priority=1, description='Ship name', examples=['RMS Titanic']), 'ship_type': FieldInfo(annotation=Union[GeneralShipType, NoneType], required=False, alias='shipType', alias_priority=1, description='General ship type, based on AIS'), 'speed_max': FieldInfo(annotation=Union[float, NoneType], required=False, alias='speedMax', alias_priority=1, description='Maximum speed of the ship in knots', examples=[15.0], metadata=[Gt(gt=0)]), 'width': FieldInfo(annotation=float, required=False, alias='width', alias_priority=1, description='Width of the ship in meters', examples=[30.0], metadata=[Gt(gt=0)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.Initial(*, position: Position = None, sog: float = None, cog: float = None, heading: float = None, navStatus: AISNavStatus | None = None)#
Bases:
BaseModelConfig
- sog: float#
- cog: float#
- heading: float#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cog': FieldInfo(annotation=float, required=False, alias='cog', alias_priority=1, description='Initial ship course over ground in degrees', examples=[45.0], metadata=[Ge(ge=0), Le(le=360)]), 'heading': FieldInfo(annotation=float, required=False, alias='heading', alias_priority=1, description='Initial ship heading in degrees', examples=[45.2], metadata=[Ge(ge=0), Le(le=360)]), 'nav_status': FieldInfo(annotation=Union[AISNavStatus, NoneType], required=False, alias='navStatus', alias_priority=1, description='AIS Navigational Status'), 'position': FieldInfo(annotation=Position, required=False, alias='position', alias_priority=1, description='Initial longitude and latitude of the ship.', examples=[Position(latitude=57.2343, longitude=10.3432)]), 'sog': FieldInfo(annotation=float, required=False, alias='sog', alias_priority=1, description='Initial ship speed over ground in knots', examples=[10.0], metadata=[Ge(ge=0)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.DataPoint(*, value: float | None = None, mBeforeLegChange: float | None = None, mAfterLegChange: float | None = None, interpMethod: InterpolationMethod | str | None = None)#
Bases:
BaseModelConfig
- value: float | None#
- m_before_leg_change: float | None#
- m_after_leg_change: float | None#
- interp_method: InterpolationMethod | str | None#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'interp_method': FieldInfo(annotation=Union[InterpolationMethod, str, NoneType], required=False, alias='interpMethod', alias_priority=1, description='Method used for interpolation'), 'm_after_leg_change': FieldInfo(annotation=Union[float, NoneType], required=False, alias='mAfterLegChange', alias_priority=1, description='meters after the waypoint to finish interpolating to the new value', examples=[10]), 'm_before_leg_change': FieldInfo(annotation=Union[float, NoneType], required=False, alias='mBeforeLegChange', alias_priority=1, description='meters before the waypoint to start interpolating to the new value', examples=[10]), 'value': FieldInfo(annotation=Union[float, NoneType], required=False, alias='value', alias_priority=1, description='the value of the data at the current timestep', examples=[12.3])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.Data(**extra_data: Any)#
Bases:
BaseModelConfig
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'json_schema_extra': {'additionalProperties': {'description': "The 'data' field can include additional properties. All additional properties should be DataPoint objects.", 'properties': {'interpMethod': {'type': 'string'}, 'mAfterLegChange': {'type': 'number'}, 'mBeforeLegChange': {'type': 'number'}, 'value': {'type': 'number'}}, 'required': [], 'type': 'object'}, 'heading': {'description': 'Heading data point', 'examples': [{'interpMethod': 'linear', 'mAfterLegChange': 100, 'mBeforeLegChange': 100, 'value': 180}], 'properties': {'interpMethod': {'type': 'string'}, 'mAfterLegChange': {'type': 'number'}, 'mBeforeLegChange': {'type': 'number'}, 'value': {'type': 'number'}}, 'required': [], 'type': 'object'}, 'sog': {'description': 'Speed data point', 'examples': [{'interpMethod': 'linear', 'mAfterLegChange': 100, 'mBeforeLegChange': 100, 'value': 12.3}], 'properties': {'interpMethod': {'type': 'string'}, 'mAfterLegChange': {'type': 'number'}, 'mBeforeLegChange': {'type': 'number'}, 'value': {'type': 'number'}}, 'required': [], 'type': 'object'}}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.Waypoint(*, position: Position, turnRadius: float | None = None, data: Data | None = None)#
Bases:
BaseModelConfig
- turn_radius: float | None#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'data': FieldInfo(annotation=Union[Data, NoneType], required=False, alias='data', alias_priority=1, description='A `Data` object that includes `speed`, `course`, and `heading` data points'), 'position': FieldInfo(annotation=Position, required=True, alias='position', alias_priority=1, description='A geographical coordinate', examples=[Position(latitude=51.2123, longitude=11.2313)]), 'turn_radius': FieldInfo(annotation=Union[float, NoneType], required=False, alias='turnRadius', alias_priority=1, description='Orthodrome turn radius as defined in RTZ format', examples=[200])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.Ship(*, static: ShipStatic = None, initial: Initial | None = None, waypoints: List[Waypoint] | None = None)#
Bases:
BaseModelConfig
- static: ShipStatic#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'initial': FieldInfo(annotation=Union[Initial, NoneType], required=False, alias='initial', alias_priority=1, examples=[Initial(position=Position(latitude=57.2343, longitude=10.3432), sog=12.3, cog=284.2, heading=283.1, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>)]), 'static': FieldInfo(annotation=ShipStatic, required=False, alias='static', alias_priority=1, description='Static ship information which does not change during a scenario.', examples=[ShipStatic(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), length=230.0, width=30.0, height=15.0, speed_max=20.0, mmsi=123456789, imo=1000001, name='RMS Titanic', ship_type=<GeneralShipType.FISHING: 'Fishing'>)]), 'waypoints': FieldInfo(annotation=Union[List[Waypoint], NoneType], required=False, alias='waypoints', alias_priority=1, description='An array of `Waypoint` objects. Each waypoint object must have a `position` property. <br /> If no turn radius is provided, it will be assumed to be `0`. <br /> 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=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.OwnShip(*, static: ShipStatic = None, initial: Initial | None = None, waypoints: List[Waypoint] | None = None)#
Bases:
Ship
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'initial': FieldInfo(annotation=Union[Initial, NoneType], required=False, alias='initial', alias_priority=1, examples=[Initial(position=Position(latitude=57.2343, longitude=10.3432), sog=12.3, cog=284.2, heading=283.1, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>)]), 'static': FieldInfo(annotation=ShipStatic, required=False, alias='static', alias_priority=1, description='Static ship information which does not change during a scenario.', examples=[ShipStatic(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), length=230.0, width=30.0, height=15.0, speed_max=20.0, mmsi=123456789, imo=1000001, name='RMS Titanic', ship_type=<GeneralShipType.FISHING: 'Fishing'>)]), 'waypoints': FieldInfo(annotation=Union[List[Waypoint], NoneType], required=False, alias='waypoints', alias_priority=1, description='An array of `Waypoint` objects. Each waypoint object must have a `position` property. <br /> If no turn radius is provided, it will be assumed to be `0`. <br /> 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=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.TargetShip(*, static: ShipStatic = None, initial: Initial | None = None, waypoints: List[Waypoint] | None = None)#
Bases:
Ship
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'initial': FieldInfo(annotation=Union[Initial, NoneType], required=False, alias='initial', alias_priority=1, examples=[Initial(position=Position(latitude=57.2343, longitude=10.3432), sog=12.3, cog=284.2, heading=283.1, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>)]), 'static': FieldInfo(annotation=ShipStatic, required=False, alias='static', alias_priority=1, description='Static ship information which does not change during a scenario.', examples=[ShipStatic(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), length=230.0, width=30.0, height=15.0, speed_max=20.0, mmsi=123456789, imo=1000001, name='RMS Titanic', ship_type=<GeneralShipType.FISHING: 'Fishing'>)]), 'waypoints': FieldInfo(annotation=Union[List[Waypoint], NoneType], required=False, alias='waypoints', alias_priority=1, description='An array of `Waypoint` objects. Each waypoint object must have a `position` property. <br /> If no turn radius is provided, it will be assumed to be `0`. <br /> 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=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.TrafficSituation(*, title: str = None, description: str | None = None, startTime: datetime | None = None, ownShip: OwnShip, targetShips: List[TargetShip] = None, environment: Environment | None = None, **extra_data: Any)#
Bases:
BaseModelConfig
- title: str#
- description: str | None#
- start_time: datetime | None#
- target_ships: List[TargetShip]#
- environment: Environment | None#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'json_schema_extra': {'additionalProperties': True, 'omit_default': True}, 'populate_by_name': True, 'title': 'Test Input Schema'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=Union[str, NoneType], required=False, alias='description', alias_priority=1, description='A description of the traffic situation', examples=['Crossing situation with 3 target vessels in the Oslofjord']), 'environment': FieldInfo(annotation=Union[Environment, NoneType], required=False, alias='environment', alias_priority=1, description='environmental parameters', examples=[Environment(air_temperature=20.0, water_remperature=15.0, precipitation=<PrecipitationType.Rain: 'Rain'>, wind_speed=10.0, wind_direction=180.0, current_speed=1.0, current_direction=90.0, wave_spectrum=<WaveSpectra.JONSWAP: 'JONSWAP'>, significant_wave_height=3.0, wave_period=12.0, wave_direction=270.0, visibility=5.0, conditions=<WeatherCondition.Clear: 'Clear'>)]), 'own_ship': FieldInfo(annotation=OwnShip, required=True, alias='ownShip', alias_priority=1, title='Own Ship data', description='Own Ship data', examples=[Ship(static=ShipStatic(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), length=230.0, width=30.0, height=15.0, speed_max=20.0, mmsi=123456789, imo=1000001, name='RMS Titanic', ship_type=<GeneralShipType.FISHING: 'Fishing'>), initial=Initial(position=Position(latitude=57.2343, longitude=10.3432), sog=12.3, cog=284.2, heading=283.1, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>), waypoints=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))])]), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='startTime', alias_priority=1, description='Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 687506)]), 'target_ships': FieldInfo(annotation=List[TargetShip], required=False, alias='targetShips', alias_priority=1, title='Target Ship data', description='Target Ship data', examples=[[Ship(static=ShipStatic(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), length=230.0, width=30.0, height=15.0, speed_max=20.0, mmsi=123456789, imo=1000001, name='RMS Titanic', ship_type=<GeneralShipType.FISHING: 'Fishing'>), initial=Initial(position=Position(latitude=57.2343, longitude=10.3432), sog=12.3, cog=284.2, heading=283.1, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>), waypoints=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))])]]), 'title': FieldInfo(annotation=str, required=False, alias='title', alias_priority=1, description='The title of the traffic situation', examples=['overtaking_18'])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.SoftwareConfig(*, name: str, vendor: str, version: str)#
Bases:
BaseModelConfig
- name: str#
- vendor: str#
- version: str#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True, alias='name', alias_priority=1, description='The name of the system', examples=['AutoNavigation-System 1']), 'vendor': FieldInfo(annotation=str, required=True, alias='vendor', alias_priority=1, description='The name of the system vendor', examples=['CompanyABC']), 'version': FieldInfo(annotation=str, required=True, alias='version', alias_priority=1, description='The software version', examples=['1.2.3'])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.CagaConfiguration(*, name: str, vendor: str, version: str)#
Bases:
BaseModelConfig
- name: str#
- vendor: str#
- version: str#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True, 'properties': {'vendor_automatic_manoeuver_acceptance_time': {'description': 'If automatic maneuver acceptance is enabled, the new route will be activated after a specified number of seconds', 'examples': [20], 'type': 'number'}, 'vendor_critical_TCPA': {'description': 'If the projected CPA is less than minimumDistanceToTargets, and TCPA falls below criticalTCPA, a new manoeuver should be calculated', 'examples': [1000], 'type': 'number'}, 'vendor_manoeuver_delay': {'description': 'Time given in seconds to the navigator / system, before the proposed manoeuver is no longer able to be excecuted', 'examples': [20], 'type': 'number'}, 'vendor_minimum_distance_to_targets': {'description': 'Minimum distance in meters that the system will keep to other Vessels', 'examples': [100], 'type': 'number'}, 'vendor_safety_depth': {'description': 'Minimum safety depth', 'examples': [30], 'type': 'number'}}}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True, alias='name', alias_priority=1, description='The name of the system', examples=['AutoNavigation-System 1']), 'vendor': FieldInfo(annotation=str, required=True, alias='vendor', alias_priority=1, description='The name of the system vendor', examples=['CompanyABC']), 'version': FieldInfo(annotation=str, required=True, alias='version', alias_priority=1, description='The software version', examples=['1.2.3'])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.EncounterType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
str
,Enum
- OVERTAKING_STAND_ON = 'Overtaking stand-on'#
- OVERTAKING_GIVE_WAY = 'Overtaking give-way'#
- HEAD_ON = 'Head-on'#
- CROSSING_GIVE_WAY = 'Crossing give-way'#
- CROSSING_STAND_ON = 'Crossing stand-on'#
- NO_RISK = 'No Risk'#
- class maritime_schema.types.caga.PredictedPoint(*, time: datetime | int, value: float | Any)#
Bases:
BaseModelConfig
- time: datetime | int#
- value: float | Any#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'time': FieldInfo(annotation=Union[datetime, int], required=True, alias='time', alias_priority=1, description='Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 716637)]), 'value': FieldInfo(annotation=Union[float, Any], required=True, alias='value', alias_priority=1, description='Value of the prediction', examples=[Position(latitude=57.2343, longitude=10.3432), 100])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.DetectedShip(*, id: UUID, position: Position, sog: float, cog: float, heading: float | None = None, navStatus: AISNavStatus = None, encounterType: EncounterType | None = None, colregRulesApplied: List[int] = None, distanceToTarget: float = None, dcpa: float | None = None, tcpa: float | None = None, predictions: Dict[str, List[PredictedPoint]] | None = None)#
Bases:
BaseModelConfig
- id: UUID#
- sog: float#
- cog: float#
- heading: float | None#
- encounter_type: EncounterType | None#
- colreg_rules_applied: List[int]#
- distance_to_target: float#
- dcpa: float | None#
- tcpa: float | None#
- predictions: Dict[str, List[PredictedPoint]] | None#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cog': FieldInfo(annotation=float, required=True, alias='cog', alias_priority=1, description='Initial ship course over ground in degrees', examples=[45.0], metadata=[Ge(ge=0), Le(le=360)]), 'colreg_rules_applied': FieldInfo(annotation=List[int], required=False, alias='colregRulesApplied', alias_priority=1, 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]]), 'dcpa': FieldInfo(annotation=Union[float, NoneType], required=False, alias='dcpa', alias_priority=1, description='Calculated closest point of approach', examples=[100.3]), 'distance_to_target': FieldInfo(annotation=float, required=False, alias='distanceToTarget', alias_priority=1, description='Calculated distance from the own ship to the target vessel', examples=[1900.2]), 'encounter_type': FieldInfo(annotation=Union[EncounterType, NoneType], required=False, alias='encounterType', alias_priority=1, description='COLREG encounter type', examples=['Overtaking stand-on']), 'heading': FieldInfo(annotation=Union[float, NoneType], required=False, alias='heading', alias_priority=1, description='Initial ship heading in degrees', examples=[45.2], metadata=[Ge(ge=0), Le(le=360)]), 'id': FieldInfo(annotation=UUID, required=True, alias='id', alias_priority=1, description='Unique Identifier', examples=[UUID('5db00bf1-121f-416d-8b9c-0fcd19cb12c4')]), 'nav_status': FieldInfo(annotation=AISNavStatus, required=False, alias='navStatus', alias_priority=1, description='AIS Navigational Status'), 'position': FieldInfo(annotation=Position, required=True, alias='position', alias_priority=1, description='A geographical coordinate', examples=[Position(latitude=51.2123, longitude=11.2313)]), 'predictions': FieldInfo(annotation=Union[Dict[str, List[PredictedPoint]], NoneType], required=False, alias='predictions', alias_priority=1, description='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', examples=[[PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 717993), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 718012), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 718022), value=Position(latitude=57.2343, longitude=10.3432))]]), 'sog': FieldInfo(annotation=float, required=True, alias='sog', alias_priority=1, description='Initial ship speed over ground in knots', examples=[10.0], metadata=[Ge(ge=0)]), 'tcpa': FieldInfo(annotation=Union[float, NoneType], required=False, alias='tcpa', alias_priority=1, description='calculated time to closest point of approach in seconds', examples=[2131])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.SimulatedShip(*, id: UUID, position: Position, sog: float, cog: float, heading: float | None = None, navStatus: AISNavStatus, acceleration: float = None, rateOfTurn: float = None)#
Bases:
BaseModelConfig
- id: UUID#
- sog: float#
- cog: float#
- heading: float | None#
- acceleration: float#
- rate_of_turn: float#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'acceleration': FieldInfo(annotation=float, required=False, alias='acceleration', alias_priority=1, description='Ship acceleration in `ms^-2`', examples=[0.01]), 'cog': FieldInfo(annotation=float, required=True, alias='cog', alias_priority=1, description='Initial ship course over ground in degrees', examples=[45.0], metadata=[Ge(ge=0), Le(le=360)]), 'heading': FieldInfo(annotation=Union[float, NoneType], required=False, alias='heading', alias_priority=1, title='ship heading', description='Initial ship heading in degrees', examples=[45.2], metadata=[Ge(ge=0), Le(le=360)]), 'id': FieldInfo(annotation=UUID, required=True, alias='id', alias_priority=1, description='Unique Identifier', examples=[UUID('a5b994df-f53e-4114-9ade-47f3d5a9e435')]), 'nav_status': FieldInfo(annotation=AISNavStatus, required=True, alias='navStatus', alias_priority=1, description='AIS Navigational Status'), 'position': FieldInfo(annotation=Position, required=True, alias='position', alias_priority=1, description='A geographical coordinate', examples=[Position(latitude=51.2123, longitude=11.2313)]), 'rate_of_turn': FieldInfo(annotation=float, required=False, alias='rateOfTurn', alias_priority=1, description='Ship rate of turn in `deg/s`', examples=[1.8]), 'sog': FieldInfo(annotation=float, required=True, alias='sog', alias_priority=1, description='Initial ship speed over ground in knots', examples=[10.0], metadata=[Ge(ge=0)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.CagaTimeStep(*, time: datetime | int, targetShips: List[DetectedShip], internalStatus: Any = None)#
Bases:
BaseModelConfig
- time: datetime | int#
- target_ships: List[DetectedShip]#
- internal_status: Any#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'internal_status': FieldInfo(annotation=Any, required=False, alias='internalStatus', alias_priority=1, description='Dictionary containing additional internal information about the system (health, status..)'), 'target_ships': FieldInfo(annotation=List[DetectedShip], required=True, alias='targetShips', alias_priority=1, description='list of target ships detected by the CAGA system', examples=[[DetectedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.2, cog=181.0, heading=182.0, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>, encounter_type=<EncounterType.HEAD_ON: 'Head-on'>, colreg_rules_applied=[12], distance_to_target=874.0, dcpa=300.0, tcpa=1200.0, predictions={'position': [PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 723892), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 723905), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 723915), value=Position(latitude=57.2343, longitude=10.3432))]})]]), 'time': FieldInfo(annotation=Union[datetime, int], required=True, alias='time', alias_priority=1, description='Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 723835)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.CagaEvent(*, time: datetime | int, route: List[Waypoint] = None, calculationTime: float | None = None)#
Bases:
BaseModelConfig
- time: datetime | int#
- calculation_time: float | None#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'calculation_time': FieldInfo(annotation=Union[float, NoneType], required=False, alias='calculationTime', alias_priority=1, description='Time to calculate new route'), 'route': FieldInfo(annotation=List[Waypoint], required=False, alias='route', alias_priority=1, description='Planned CAGA Route', examples=[[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))]]), 'time': FieldInfo(annotation=Union[datetime, int], required=True, alias='time', alias_priority=1, description='Date and Time of the event', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 725850)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.SimulatorEvent(*, time: datetime | int)#
Bases:
BaseModelConfig
- time: datetime | int#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True}, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'time': FieldInfo(annotation=Union[datetime, int], required=True, alias='time', alias_priority=1, description='Date and Time of the event', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 727699)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.CagaData(*, configuration: CagaConfiguration, timeSeriesData: List[CagaTimeStep], eventData: List[CagaEvent] = None)#
Bases:
BaseModelConfig
- configuration: CagaConfiguration#
- time_series_data: List[CagaTimeStep]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'configuration': FieldInfo(annotation=CagaConfiguration, required=True, alias='configuration', alias_priority=1, description='System Configuration', examples=[CagaConfiguration(name='AutoNavigation-System 1', vendor='CompanyABC', version='1.2.3')]), 'event_data': FieldInfo(annotation=List[CagaEvent], required=False, alias='eventData', alias_priority=1, description='Event data from the system', examples=[[CagaEvent(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 729250), route=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))], calculation_time=1.242)]]), 'time_series_data': FieldInfo(annotation=List[CagaTimeStep], required=True, alias='timeSeriesData', alias_priority=1, description='Time series data from the system', examples=[[CagaTimeStep(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 729047), target_ships=[DetectedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.2, cog=181.0, heading=182.0, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>, encounter_type=<EncounterType.HEAD_ON: 'Head-on'>, colreg_rules_applied=[12], distance_to_target=874.0, dcpa=300.0, tcpa=1200.0, predictions={'position': [PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 729087), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 729111), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 729132), value=Position(latitude=57.2343, longitude=10.3432))]})], internal_status=None)]])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.SimulationTimeFrame(*, time: datetime | int, ownShip: SimulatedShip, targetShips: List[SimulatedShip])#
Bases:
BaseModelConfig
- time: datetime | int#
- own_ship: SimulatedShip#
- target_ships: List[SimulatedShip]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'own_ship': FieldInfo(annotation=SimulatedShip, required=True, alias='ownShip', alias_priority=1), 'target_ships': FieldInfo(annotation=List[SimulatedShip], required=True, alias='targetShips', alias_priority=1), 'time': FieldInfo(annotation=Union[datetime, int], required=True, alias='time', alias_priority=1, description='Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`', examples=[datetime.datetime(2024, 4, 4, 13, 41, 3, 732334)])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.SimulationData(*, configuration: SoftwareConfig, timeSeriesData: List[SimulationTimeFrame], eventData: List[SimulatorEvent] = None)#
Bases:
BaseModelConfig
- configuration: SoftwareConfig#
- time_series_data: List[SimulationTimeFrame]#
- event_data: List[SimulatorEvent]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'configuration': FieldInfo(annotation=SoftwareConfig, required=True, alias='configuration', alias_priority=1, description='Simulator software configuration', examples=[SoftwareConfig(name='AutoNavigation-System 1', vendor='CompanyABC', version='1.2.3')]), 'event_data': FieldInfo(annotation=List[SimulatorEvent], required=False, alias='eventData', alias_priority=1, description='Event data from the simulator'), 'time_series_data': FieldInfo(annotation=List[SimulationTimeFrame], required=True, alias='timeSeriesData', alias_priority=1, description='TimeSeries data originating from the Simulator', examples=[[SimulationTimeFrame(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 733713), own_ship=SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), target_ships=[SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0)]), SimulationTimeFrame(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 733785), own_ship=SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), target_ships=[SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0)])]])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class maritime_schema.types.caga.OutputSchema(*, creationTime: datetime, trafficSituation: TrafficSituation | None = None, cagaData: CagaData | None = None, simulationData: SimulationData | None = None)#
Bases:
BaseModelConfig
- creation_time: datetime#
- traffic_situation: TrafficSituation | None#
- simulation_data: SimulationData | None#
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'json_schema_extra': {'additionalProperties': True, 'description': '#### This is a JSON schema for result data originating from Collision and Grounding Avoidance systems'}, 'populate_by_name': True, 'title': 'Test Output Schema'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'caga_data': FieldInfo(annotation=Union[CagaData, NoneType], required=False, alias='cagaData', alias_priority=1, description='Data generated by the system under test (auto-navigation / collision and grounding avoidance system) during the scenario.', examples=[CagaData(configuration=CagaConfiguration(name='AutoNavigation-System 1', vendor='CompanyABC', version='1.2.3'), time_series_data=[CagaTimeStep(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735483), target_ships=[DetectedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.2, cog=181.0, heading=182.0, nav_status=<AISNavStatus.UNDER_WAY_USING_ENGINE: 'Under way using engine'>, encounter_type=<EncounterType.HEAD_ON: 'Head-on'>, colreg_rules_applied=[12], distance_to_target=874.0, dcpa=300.0, tcpa=1200.0, predictions={'position': [PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735501), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735513), value=Position(latitude=57.2343, longitude=10.3432)), PredictedPoint(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735523), value=Position(latitude=57.2343, longitude=10.3432))]})], internal_status=None)], event_data=[CagaEvent(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735548), route=[Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'))), Waypoint(position=Position(latitude=57.2343, longitude=10.3432), turn_radius=500.0, data=Data(sog=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear'), heading=DataPoint(value=12.3, m_before_leg_change=100.0, m_after_leg_change=100.0, interp_method='linear')))], calculation_time=1.242)])]), 'creation_time': FieldInfo(annotation=datetime, required=True, alias='creationTime', alias_priority=1, 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=[datetime.datetime(2024, 4, 4, 13, 41, 3, 735389)]), 'simulation_data': FieldInfo(annotation=Union[SimulationData, NoneType], required=False, alias='simulationData', alias_priority=1, description='Data generated by the simulator duirng the scenario', examples=[SimulationData(configuration=SoftwareConfig(name='AutoNavigation-System 1', vendor='CompanyABC', version='1.2.3'), time_series_data=[SimulationTimeFrame(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735683), own_ship=SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), target_ships=[SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0)]), SimulationTimeFrame(time=datetime.datetime(2024, 4, 4, 13, 41, 3, 735736), own_ship=SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), target_ships=[SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0), SimulatedShip(id=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), position=Position(latitude=57.2343, longitude=10.3432), sog=10.0, cog=181.0, heading=182.0, nav_status=<AISNavStatus.ENGAGED_IN_FISHING: 'Engaged in fishing'>, acceleration=0.01, rate_of_turn=1.0)])], event_data=[])]), 'traffic_situation': FieldInfo(annotation=Union[TrafficSituation, NoneType], required=False, alias='trafficSituation', alias_priority=1, description='The traffic situation that was simulated (input file). This should remain unmofidied.')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- maritime_schema.types.caga.publish_schema(schema_dir: str | PathLike[str] | None = None, docs_dir: str | PathLike[str] | None = None)#
Generate input and output schema and the corresponding html documentation.
- Parameters:
schema_dir (Union[str, os.PathLike[str], None], optional) – The folder in which the schema files shall be generated in. If None, schema files will be generated in ./schema/caga. , by default None
docs_dir (Union[str, os.PathLike[str]]) – The folder in which the html documentation files shall be generated in. If None, html files will be generated in ./docs/schema/caga. , by default None