From b59f3f5a177b5fb60d36079a1da9fce0ab7ee68d Mon Sep 17 00:00:00 2001 From: Minos Hemrich Date: Fri, 23 Feb 2024 12:42:36 +0100 Subject: [PATCH] update with changes from branch 1 --- src/maritime_schema/types/caga.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/maritime_schema/types/caga.py b/src/maritime_schema/types/caga.py index e2b3714..877348b 100644 --- a/src/maritime_schema/types/caga.py +++ b/src/maritime_schema/types/caga.py @@ -331,8 +331,6 @@ class Config: extra = "allow" -# %% - # Ownship ownship_initial = Initial( position=Position(latitude=57.7089, longitude=11.9746), # Gothenburg @@ -369,8 +367,6 @@ class Config: ) -# %% - name_example = "AutoNavigation-System 1" name_example1 = "Simulator-System 1" version_example = "1.2.3" @@ -428,8 +424,6 @@ class Config: automatic_manoeuver_acceptance_time=7, ) -# %% - class EncounterType(str, Enum): OVERTAKING_STAND_ON = "Overtaking stand-on" @@ -629,11 +623,18 @@ class Config: class CagaEvent(BaseModel): - time: Union[datetime, int] = Field(..., description="Date and Time of the event", examples=[datetime.now()]) - route: List[Waypoint] = Field(None, description="Planned CAGA Route", examples=[waypoint_list_example]) + time: Union[datetime, int] = Field(..., description='Date and Time of the event', examples=[ + datetime.now()]) + route: List[Waypoint] = Field( + None, description="Planned CAGA Route", examples=[waypoint_list_example]) + + calculation_time: Optional[float] = Field( + None, description="Time to calculate new route") class Config: - extra = "allow" + extra = 'allow' + alias_generator = to_camel + populate_by_name = True caga_event_example = CagaEvent(time=datetime.now(), route=waypoint_list_example)