feat(race-day): start heats with an EFRA/IFMAR count-down and flying start

Race Day Start now runs a count-down (Go, 30 s - 5 min, default per
event) with calls every minute, 30 s and 10 s, grid call and 9..3
count for grid starts, hold/resume/+1 min/to 30 s/to 10 s/Go now, and
starts the heat by itself when it runs out. The transponder check runs
during the count-down, replacing the separate warm-up.

Adds a flying start mode (horn + clock is running, own clock per car)
as the qualifying default, and the latest personal clock start rules
from EFRA 9.3 / IFMAR 4.2.3 for flying and staggered starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssandandClaude Opus 5.5 committed 2026-09-30 21:27:20 +02:00
1 parent 1bc75f8ec1
commit 5bfb67ea02
27 files changed
+884 -334

No files matched your search

+6 -2
View File
@@ -89,7 +89,11 @@ export function getSessionTiming(session, nowTs = Date.now(), { getSessionTarget
const gridCount = Array.isArray(session?.manualGridIds) && session.manualGridIds.length
? session.manualGridIds.length
: Array.isArray(session?.driverIds) ? session.driverIds.length : 0;
const staggerExtensionMs = session?.startMode === "staggered" && baseTargetMs !== null && gridCount > 1
// A flying start's last car gets its clock at the latest ~1.5 laps after the horn (EFRA
// 9.3), so the shared clock gets one extra minute to cover that.
const staggerExtensionMs = baseTargetMs === null ? 0
: session?.startMode === "flying" ? 60000
: session?.startMode === "staggered" && gridCount > 1
? (gridCount - 1) * Math.max(0, Number(session?.staggerGapSec || 3) || 3) * 1000
: 0;
const targetMs = baseTargetMs === null ? null : baseTargetMs + staggerExtensionMs;
@@ -241,7 +245,7 @@ export function buildLeaderboard(session, { ensureSessionResult, getSessionTarge
// starts already share one clock, which the session-level countdown already covers.
const personalStartTs = Number(row.startTimestamp || 0) || 0;
const personalTimeUp = Boolean(
session.startMode === "staggered" && targetMs !== null && personalStartTs
(session.startMode === "staggered" || session.startMode === "flying") && targetMs !== null && personalStartTs
&& (nowTs - personalStartTs - totalPausedMs) >= targetMs
);
return {