initial structure implemented

docs -> _docs
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-01 14:20:56 +02:00
parent 9134c5db06
commit abc26d5c20
360 changed files with 3881 additions and 101 deletions
@@ -0,0 +1,68 @@
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