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,5 @@
from .base import RouteChunkManagerBase
from .route_chunk_manager import RouteChunkManager
__all__ = ["RouteChunkManagerBase", "RouteChunkManager"]
+65
View File
@@ -0,0 +1,65 @@
from abc import ABC, abstractmethod
from typing import Optional
from models.chunks import ChunkHandle, ChunkBounds, Sim3Transform
from models.core import GPSPoint
from models.processing import ChunkAlignmentResult
class RouteChunkManagerBase(ABC):
@abstractmethod
async def create_chunk(
self, flight_id: str, start_frame_id: int
) -> ChunkHandle:
pass
@abstractmethod
async def add_frame_to_chunk(
self, chunk_id: str, frame_id: int
) -> bool:
pass
@abstractmethod
async def finalize_chunk(self, chunk_id: str) -> bool:
pass
@abstractmethod
async def get_chunk(self, chunk_id: str) -> Optional[ChunkHandle]:
pass
@abstractmethod
async def get_active_chunk(
self, flight_id: str
) -> Optional[ChunkHandle]:
pass
@abstractmethod
async def get_flight_chunks(
self, flight_id: str
) -> list[ChunkHandle]:
pass
@abstractmethod
async def estimate_chunk_bounds(
self, chunk_id: str
) -> ChunkBounds:
pass
@abstractmethod
async def anchor_chunk(
self, chunk_id: str, frame_id: int, gps: GPSPoint
) -> bool:
pass
@abstractmethod
async def match_chunk_to_satellite(
self, chunk_id: str
) -> Optional[ChunkAlignmentResult]:
pass
@abstractmethod
async def apply_transform_to_chunk(
self, chunk_id: str, transform: Sim3Transform
) -> bool:
pass
@@ -0,0 +1,55 @@
from typing import Optional
from .base import RouteChunkManagerBase
from models.chunks import ChunkHandle, ChunkBounds, Sim3Transform
from models.core import GPSPoint
from models.processing import ChunkAlignmentResult
class RouteChunkManager(RouteChunkManagerBase):
async def create_chunk(
self, flight_id: str, start_frame_id: int
) -> ChunkHandle:
raise NotImplementedError
async def add_frame_to_chunk(
self, chunk_id: str, frame_id: int
) -> bool:
raise NotImplementedError
async def finalize_chunk(self, chunk_id: str) -> bool:
raise NotImplementedError
async def get_chunk(self, chunk_id: str) -> Optional[ChunkHandle]:
raise NotImplementedError
async def get_active_chunk(
self, flight_id: str
) -> Optional[ChunkHandle]:
raise NotImplementedError
async def get_flight_chunks(
self, flight_id: str
) -> list[ChunkHandle]:
raise NotImplementedError
async def estimate_chunk_bounds(
self, chunk_id: str
) -> ChunkBounds:
raise NotImplementedError
async def anchor_chunk(
self, chunk_id: str, frame_id: int, gps: GPSPoint
) -> bool:
raise NotImplementedError
async def match_chunk_to_satellite(
self, chunk_id: str
) -> Optional[ChunkAlignmentResult]:
raise NotImplementedError
async def apply_transform_to_chunk(
self, chunk_id: str, transform: Sim3Transform
) -> bool:
raise NotImplementedError