Skip to content

Commit

Permalink
update with changes from branch 1
Browse files Browse the repository at this point in the history
  • Loading branch information
minhemdnv committed Feb 23, 2024
1 parent 3e86989 commit b59f3f5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/maritime_schema/types/caga.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,6 @@ class Config:
extra = "allow"


# %%

# Ownship
ownship_initial = Initial(
position=Position(latitude=57.7089, longitude=11.9746), # Gothenburg
Expand Down Expand Up @@ -369,8 +367,6 @@ class Config:
)


# %%

name_example = "AutoNavigation-System 1"
name_example1 = "Simulator-System 1"
version_example = "1.2.3"
Expand Down Expand Up @@ -428,8 +424,6 @@ class Config:
automatic_manoeuver_acceptance_time=7,
)

# %%


class EncounterType(str, Enum):
OVERTAKING_STAND_ON = "Overtaking stand-on"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b59f3f5

Please sign in to comment.