mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 23:56:35 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from .flight import Flight
|
||||
from .flight_state import FlightState
|
||||
from .waypoint import Waypoint
|
||||
from .geofences import Geofences
|
||||
from .heading_record import HeadingRecord
|
||||
|
||||
__all__ = [
|
||||
"Flight",
|
||||
"FlightState",
|
||||
"Waypoint",
|
||||
"Geofences",
|
||||
"HeadingRecord",
|
||||
]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
from ..core.gps_point import GPSPoint
|
||||
from ..core.camera_parameters import CameraParameters
|
||||
from .waypoint import Waypoint
|
||||
from .geofences import Geofences
|
||||
|
||||
|
||||
class Flight(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
description: str
|
||||
start_gps: GPSPoint
|
||||
waypoints: list[Waypoint]
|
||||
geofences: Geofences
|
||||
camera_params: CameraParameters
|
||||
altitude: float
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class FlightState(BaseModel):
|
||||
flight_id: str
|
||||
status: str
|
||||
frames_processed: int
|
||||
frames_total: int
|
||||
current_frame: Optional[int] = None
|
||||
blocked: bool = False
|
||||
search_grid_size: Optional[int] = None
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
from ..core.polygon import Polygon
|
||||
|
||||
|
||||
class Geofences(BaseModel):
|
||||
polygons: list[Polygon]
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HeadingRecord(BaseModel):
|
||||
frame_id: int
|
||||
heading: float
|
||||
timestamp: datetime
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Waypoint(BaseModel):
|
||||
id: str
|
||||
lat: float
|
||||
lon: float
|
||||
altitude: Optional[float] = None
|
||||
confidence: float
|
||||
timestamp: datetime
|
||||
refined: bool = False
|
||||
|
||||
Reference in New Issue
Block a user