From 8d4bfe968458926db453152249d3816825b7ce70 Mon Sep 17 00:00:00 2001 From: itsrubberduck Date: Wed, 27 May 2026 14:43:48 +0200 Subject: [PATCH] feat(atis): clock-locked ATIS loop tied to tuned frequency Real ATIS broadcasts run continuously; tuning in mid-broadcast should drop the pilot into the current spoken position, then loop. The frontend now generates the full announcement once via TTS, plays it as a looping HTMLAudioElement, and seeks to ((Date.now() - lastUpdated) / duration) on metadata-load so all clients tuned to the same ATIS hear it phase- synced. The loop starts/stops automatically with frequency tuning and restarts on info-letter change. say.post.ts now caches tag=atis like tag=flightlab to avoid re-synthesizing identical announcements. Co-Authored-By: Claude Opus 4.7 --- app/pages/pm.vue | 157 +++++++++++++++--- ...26-05-27-atis-virtual-clock-loop-design.md | 51 ++++++ server/api/atc/say.post.ts | 15 +- 3 files changed, 196 insertions(+), 27 deletions(-) create mode 100644 docs/plans/2026-05-27-atis-virtual-clock-loop-design.md diff --git a/app/pages/pm.vue b/app/pages/pm.vue index 5addd60..f8b1415 100644 --- a/app/pages/pm.vue +++ b/app/pages/pm.vue @@ -983,7 +983,7 @@