[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>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-20 16:29:59 +03:00
parent 64d961f60c
commit 87fe98858f
13 changed files with 1360 additions and 7 deletions
+4 -4
View File
@@ -6,10 +6,10 @@ step: 10
name: Implement
status: in_progress
sub_step:
phase: 12
name: update-tracker-in-testing
detail: "batch 98 of ~102: AZ-697 + AZ-702"
phase: 6
name: implement-tasks-sequentially
detail: "batch 100 of ~102: AZ-699"
retry_count: 0
cycle: 2
tracker: jira
last_completed_batch: 98
last_completed_batch: 99