mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-23 05:36:36 +00:00
39 lines
907 B
Python
39 lines
907 B
Python
"""Global Place Recognition schemas (Component F08)."""
|
|
|
|
from typing import Optional
|
|
|
|
import numpy as np
|
|
from pydantic import BaseModel
|
|
|
|
from gps_denied.schemas.flight import GPSPoint
|
|
from gps_denied.schemas.satellite import TileBounds
|
|
|
|
|
|
class TileCandidate(BaseModel):
|
|
"""A matched satellite tile candidate."""
|
|
tile_id: str
|
|
gps_center: GPSPoint
|
|
bounds: TileBounds
|
|
similarity_score: float
|
|
rank: int
|
|
spatial_score: Optional[float] = None
|
|
|
|
|
|
class DatabaseMatch(BaseModel):
|
|
"""Raw index match from Faiss queries."""
|
|
index: int
|
|
tile_id: str
|
|
distance: float
|
|
similarity_score: float
|
|
|
|
|
|
class SatelliteTile(BaseModel):
|
|
"""A stored satellite tile representation for indexing."""
|
|
model_config = {"arbitrary_types_allowed": True}
|
|
|
|
tile_id: str
|
|
image: np.ndarray
|
|
gps_center: GPSPoint
|
|
bounds: TileBounds
|
|
descriptor: Optional[np.ndarray] = None
|