Un-pydantic FlightWaypoint.

Apparently it's a bad idea to try to make the core data pydantic models,
and those should really be treated more as a view-model. Doing otherwise
causes odd patterns (like the UI info I had leaked into the core type),
and makes it harder to interop with third-party types.
This commit is contained in:
Dan Albert
2022-02-21 23:10:28 -08:00
parent c5ab0431a9
commit 3e08e0e8b6
7 changed files with 305 additions and 286 deletions

View File

@@ -5,10 +5,10 @@ import math
import random
from abc import ABC, abstractmethod
from collections.abc import Iterable
from dataclasses import dataclass
from typing import TypeVar, Union
from dcs import Point
from pydantic.dataclasses import dataclass
from shapely.geometry import Point as ShapelyPoint
METERS_TO_FEET = 3.28084