mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 23:46:37 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
from .base import FlightProcessingEngineBase
|
||||
from .flight_processing_engine import FlightProcessingEngine
|
||||
|
||||
__all__ = ["FlightProcessingEngineBase", "FlightProcessingEngine"]
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
from typing import Optional
|
||||
import numpy as np
|
||||
|
||||
from .base import FlightProcessingEngineBase
|
||||
from models.images import ImageData
|
||||
from models.results import FrameResult
|
||||
from models.processing import RelativePose
|
||||
from models.recovery import UserAnchor
|
||||
|
||||
|
||||
class FlightProcessingEngine(FlightProcessingEngineBase):
|
||||
async def process_frame(
|
||||
self, flight_id: str, image: ImageData
|
||||
) -> Optional[FrameResult]:
|
||||
raise NotImplementedError
|
||||
|
||||
async def get_relative_pose(
|
||||
self, prev_image: np.ndarray, curr_image: np.ndarray
|
||||
) -> RelativePose:
|
||||
raise NotImplementedError
|
||||
|
||||
async def apply_user_anchor(
|
||||
self, flight_id: str, frame_id: int, anchor: UserAnchor
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def is_blocked(self, flight_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def resume_processing(self, flight_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def get_current_chunk_id(self, flight_id: str) -> Optional[str]:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user