Files
gps-denied-onboard/components/flight_api/flight_api.py
T
Oleksandr Bezdieniezhnykh abc26d5c20 initial structure implemented
docs -> _docs
2025-12-01 14:20:56 +02:00

62 lines
1.6 KiB
Python

from typing import AsyncIterator
from fastapi import UploadFile
from .base import FlightAPIBase
from models.api import (
FlightCreateRequest,
FlightResponse,
FlightDetailResponse,
FlightStatusResponse,
DeleteResponse,
UpdateResponse,
BatchResponse,
UserFixRequest,
UserFixResponse,
ObjectGPSResponse,
)
from models.core import GPSPoint
class FlightAPI(FlightAPIBase):
async def create_flight(self, request: FlightCreateRequest) -> FlightResponse:
raise NotImplementedError
async def get_flight(self, flight_id: str) -> FlightDetailResponse:
raise NotImplementedError
async def get_flight_status(self, flight_id: str) -> FlightStatusResponse:
raise NotImplementedError
async def delete_flight(self, flight_id: str) -> DeleteResponse:
raise NotImplementedError
async def update_waypoints(
self, flight_id: str, waypoints: list[GPSPoint]
) -> UpdateResponse:
raise NotImplementedError
async def upload_batch(
self,
flight_id: str,
files: list[UploadFile],
start_sequence: int,
end_sequence: int,
batch_number: int,
) -> BatchResponse:
raise NotImplementedError
async def submit_user_fix(
self, flight_id: str, request: UserFixRequest
) -> UserFixResponse:
raise NotImplementedError
async def get_object_gps(
self, flight_id: str, frame_id: int, pixel: tuple[float, float]
) -> ObjectGPSResponse:
raise NotImplementedError
async def stream_events(self, flight_id: str) -> AsyncIterator[dict]:
raise NotImplementedError
yield