mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 22:11:13 +00:00
feat(01-02): add migration-target Protocols for vio/gpr/satellite_matcher/mavlink_io/coordinate_transforms (ARCH-05)
- VisualOdometry mirrors ISequentialVisualOdometry (4 methods) - GlobalPlaceRecognition mirrors IGlobalPlaceRecognition (7 methods) - SatelliteTileLoader mirrors SatelliteDataManager public API (11 methods) - MetricRefiner mirrors IMetricRefinement (6 methods) - MAVLinkBridgeProtocol mirrors MAVLinkBridge public API (8 methods) - CoordinateTransformsProtocol mirrors CoordinateTransformer (9 methods) - All Protocols runtime_checkable; backwards-compat I-prefixed aliases exposed for vio/gpr/metric (deprecated in Phase 2) - Pure-additive: zero existing files touched - isinstance check confirms SatelliteDataManager and CoordinateTransformer already satisfy the new Protocols structurally
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""Protocol surface for the MAVLink I/O component (ARCH-05).
|
||||
|
||||
Phase 1: mirrors the concrete ``MAVLinkBridge`` public surface from
|
||||
``core/mavlink.py`` (no ABC today). Adapters move here in Plan 07
|
||||
(mavlink_io); private helpers ``_confidence_to_fix_type`` and
|
||||
``_eskf_to_gps_input`` MUST stay re-exported from the old path.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Callable, Optional, Protocol, runtime_checkable
|
||||
|
||||
from gps_denied.schemas import GPSPoint
|
||||
from gps_denied.schemas.eskf import ESKFState, IMUMeasurement
|
||||
from gps_denied.schemas.mavlink import GPSInputMessage, RelocalizationRequest
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class MAVLinkBridgeProtocol(Protocol):
|
||||
"""Public surface of the MAVLink GPS_INPUT/IMU/telemetry bridge."""
|
||||
|
||||
def set_imu_callback(
|
||||
self, cb: Callable[[IMUMeasurement], None]
|
||||
) -> None: ...
|
||||
|
||||
def set_reloc_callback(
|
||||
self, cb: Callable[[RelocalizationRequest], None]
|
||||
) -> None: ...
|
||||
|
||||
def update_state(self, state: ESKFState, altitude_m: float = 0.0) -> None: ...
|
||||
|
||||
def notify_satellite_correction(self) -> None: ...
|
||||
|
||||
def update_drift_estimate(self, drift_m: float) -> None: ...
|
||||
|
||||
async def start(self, origin: GPSPoint) -> None: ...
|
||||
|
||||
async def stop(self) -> None: ...
|
||||
|
||||
def build_gps_input(self) -> Optional[GPSInputMessage]: ...
|
||||
Reference in New Issue
Block a user