| 52 | |
| 53 | @dataclass |
| 54 | class LeoSatellite: |
| 55 | id: str |
| 56 | name: str |
| 57 | lat: float |
| 58 | lon: float |
| 59 | alt: float |
| 60 | orbit_period: float = 0.0 |
| 61 | |
| 62 | @classmethod |
| 63 | def from_dict(cls, d: dict) -> "LeoSatellite": |
| 64 | return cls( |
| 65 | id=d["id"], name=d["name"], lat=d["lat"], lon=d["lon"], alt=d["alt"], |
| 66 | orbit_period=d.get("orbit_period", 0.0), |
| 67 | ) |
| 68 | |
| 69 | def to_dict(self) -> dict: |
| 70 | return asdict(self) |
nothing calls this directly
no outgoing calls
no test coverage detected