Files
gps-denied-onboard/src/gps_denied_onboard/replay_input/__init__.py
T
Oleksandr Bezdieniezhnykh 87fe98858f [AZ-698] Tlog trim + mid-flight alignment for replay
Adds find_aligned_window cross-correlation (NCC, per-window unit norm)
between IMU energy and video optical-flow magnitude. Returns
AlignedWindow{tlog_start_ns, tlog_end_ns, offset_ms, confidence,
used_fallback}, with fallback to head-takeoff on low confidence to
preserve AZ-405 behavior. TlogReplayFcAdapter honors tlog_start_ns and
skips pre-window messages. New --auto-trim CLI flag, mutex with
--time-offset-ms. AC-1..AC-4 covered by unit tests; AC-5 skipped (no
real flight_derkachi.mp4 in repo). 106 tests pass in regression slice.
Zero new mypy --strict errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 16:29:59 +03:00

47 lines
1.6 KiB
Python

"""``replay_input/`` cross-cutting coordinator (AZ-405 / E-DEMO-REPLAY).
Layer-4 module per ``_docs/02_document/module-layout.md``. Converges
``(video, tlog)`` inputs into the standard :class:`FrameSource`,
:class:`FcAdapter`, and :class:`Clock` surfaces consumed by the
airborne composition root. Owns the time-alignment concern between
video frames and tlog IMU/attitude ticks (manual via
``--time-offset-ms`` or automatic via the AZ-405 IMU-take-off
detector).
New under ADR-011 (replay-as-configuration) — replaces the v1.0.0
design where replay had its own composition root.
Public surface re-exports the coordinator class, the bundle DTO, the
auto-sync decision DTO, the auto-sync config DTO, and the coordinator
error class. The detector functions in :mod:`auto_sync` are NOT
re-exported here so the public API stays focused on the composition
root's wiring needs; tests import the detectors via their full module
path.
"""
from gps_denied_onboard.replay_input.errors import ReplayInputAdapterError
from gps_denied_onboard.replay_input.interface import (
AlignedWindow,
AutoSyncConfig,
AutoSyncDecision,
ReplayInputBundle,
)
from gps_denied_onboard.replay_input.tlog_ground_truth import (
TlogGpsFix,
TlogGroundTruth,
load_tlog_ground_truth,
)
from gps_denied_onboard.replay_input.tlog_video_adapter import ReplayInputAdapter
__all__ = [
"AlignedWindow",
"AutoSyncConfig",
"AutoSyncDecision",
"ReplayInputAdapter",
"ReplayInputAdapterError",
"ReplayInputBundle",
"TlogGpsFix",
"TlogGroundTruth",
"load_tlog_ground_truth",
]