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

42 lines
1017 B
Python

from abc import ABC, abstractmethod
from typing import Optional
import numpy as np
from models.images import ImageData
from models.results import FrameResult
from models.processing import RelativePose
from models.recovery import UserAnchor
class FlightProcessingEngineBase(ABC):
@abstractmethod
async def process_frame(
self, flight_id: str, image: ImageData
) -> Optional[FrameResult]:
pass
@abstractmethod
async def get_relative_pose(
self, prev_image: np.ndarray, curr_image: np.ndarray
) -> RelativePose:
pass
@abstractmethod
async def apply_user_anchor(
self, flight_id: str, frame_id: int, anchor: UserAnchor
) -> bool:
pass
@abstractmethod
async def is_blocked(self, flight_id: str) -> bool:
pass
@abstractmethod
async def resume_processing(self, flight_id: str) -> bool:
pass
@abstractmethod
async def get_current_chunk_id(self, flight_id: str) -> Optional[str]:
pass