mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:26:37 +00:00
abc26d5c20
docs -> _docs
69 lines
1.5 KiB
Python
69 lines
1.5 KiB
Python
from abc import ABC, abstractmethod
|
|
from typing import Optional
|
|
import numpy as np
|
|
|
|
from models.recovery import (
|
|
SearchSession,
|
|
ConfidenceAssessment,
|
|
UserAnchor,
|
|
UserInputRequest,
|
|
)
|
|
from models.core import GPSPoint
|
|
from models.satellite import TileCandidate
|
|
|
|
|
|
class FailureRecoveryCoordinatorBase(ABC):
|
|
@abstractmethod
|
|
async def start_search_session(
|
|
self,
|
|
flight_id: str,
|
|
frame_id: int,
|
|
estimated_center: GPSPoint,
|
|
) -> SearchSession:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def expand_search(
|
|
self, session_id: str
|
|
) -> Optional[list[TileCandidate]]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def assess_confidence(
|
|
self, flight_id: str, frame_id: int
|
|
) -> ConfidenceAssessment:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def request_user_input(
|
|
self,
|
|
flight_id: str,
|
|
frame_id: int,
|
|
uav_image: np.ndarray,
|
|
candidates: list[TileCandidate],
|
|
) -> UserInputRequest:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def process_user_anchor(
|
|
self, flight_id: str, anchor: UserAnchor
|
|
) -> bool:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def is_recovery_needed(
|
|
self, confidence: ConfidenceAssessment
|
|
) -> bool:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def get_active_session(
|
|
self, flight_id: str
|
|
) -> Optional[SearchSession]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def cancel_session(self, session_id: str) -> bool:
|
|
pass
|
|
|