Migrate air icons to milsymbol.

All NATO icons are now generated by the milsymbol library based on their
SIDC.
This commit is contained in:
Dan Albert
2022-02-27 22:25:45 -08:00
parent 02383763ec
commit e3adcada52
6 changed files with 26 additions and 70 deletions

View File

@@ -13,6 +13,7 @@ class FlightJs(BaseModel):
id: UUID
blue: bool
position: LeafletPoint | None
sidc: str
@staticmethod
def for_flight(flight: Flight) -> FlightJs:
@@ -23,4 +24,6 @@ class FlightJs(BaseModel):
position = None
if isinstance(flight.state, InFlight):
position = flight.position().latlng()
return FlightJs(id=flight.id, blue=flight.blue, position=position)
return FlightJs(
id=flight.id, blue=flight.blue, position=position, sidc=str(flight.sidc())
)