mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 23:16:38 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
from ..core.gps_point import GPSPoint
|
||||
from ..core.camera_parameters import CameraParameters
|
||||
from ..flight.waypoint import Waypoint
|
||||
from ..flight.geofences import Geofences
|
||||
|
||||
|
||||
class FlightResponse(BaseModel):
|
||||
flight_id: str
|
||||
status: str
|
||||
message: Optional[str] = None
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class FlightDetailResponse(BaseModel):
|
||||
flight_id: str
|
||||
name: str
|
||||
description: str
|
||||
start_gps: GPSPoint
|
||||
waypoints: list[Waypoint]
|
||||
geofences: Geofences
|
||||
camera_params: CameraParameters
|
||||
altitude: float
|
||||
status: str
|
||||
frames_processed: int
|
||||
frames_total: int
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
|
||||
class FlightStatusResponse(BaseModel):
|
||||
status: str
|
||||
frames_processed: int
|
||||
frames_total: int
|
||||
current_frame: Optional[int] = None
|
||||
current_heading: Optional[float] = None
|
||||
blocked: bool = False
|
||||
search_grid_size: Optional[int] = None
|
||||
message: Optional[str] = None
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
|
||||
class DeleteResponse(BaseModel):
|
||||
deleted: bool
|
||||
flight_id: str
|
||||
|
||||
|
||||
class UpdateResponse(BaseModel):
|
||||
updated: bool
|
||||
waypoint_id: str
|
||||
|
||||
|
||||
class BatchUpdateResponse(BaseModel):
|
||||
success: bool
|
||||
updated_count: int
|
||||
failed_ids: list[str] = []
|
||||
errors: Optional[dict[str, str]] = None
|
||||
|
||||
Reference in New Issue
Block a user