TelemetrySign in

Lap delta

Algorithm delta-1.0.0 (pairs) and segments-1.0.0+segment-results-1.0.0 (per segment) · source engine/src/dtta/engine/delta/align.py, engine/src/dtta/engine/segments/results.py.

Definition

For a comparison lap A and a reference lap R, both placed on the grid sk=k1ms_k = k \cdot 1\,\mathrm{m}:

Δt(sk)=tA(sk)tR(sk)\Delta t(s_k) = t_A(s_k) - t_R(s_k)

where t(s)t(s) is each lap's PCHIP progress interpolant (see Track progress), anchored at (0,0)(0,0) and at (L,T)(L, T) with TT the lap time. Positive means the comparison lap is slower (it needed more time to reach that point). The value at the end of the lap is the final delta:

Δt(L)=TATR\Delta t(L) = T_A - T_R

The endpoint invariant

Because both interpolants are anchored at their gate crossings, the delta at s=Ls = L must equal the difference of the lap times. The engine checks Δt(L)(TATR)|\Delta t(L) - (T_A - T_R)| \le delta_invariant_tol_s (0.001 s) and a continuity bound maxΔt(sk+1)Δt(sk)Δs(1/vmin,A+1/vmin,R)\max|\Delta t(s_{k+1}) - \Delta t(s_k)| \le \Delta s\,(1/v_{min,A} + 1/v_{min,R}). A pair that fails either check is not written as a result: the worker raises and the pair is missing rather than wrong. Every served delta therefore carries invariant_ok = true, and the value is shown in the Provenance tab.

Display smoothing

Projection jitter of ~0.2–0.5 m becomes ≈ 15 ms of local texture in Δt\Delta t. For display only, the trace is smoothed with a Savitzky–Golay filter (window delta_display_smooth_m = 10 m → 11 grid points, polynomial order sg_polyorder = 2) and re-anchored so that it starts at Δt(0)\Delta t(0) and ends exactly at Δt(L)\Delta t(L). The unsmoothed series is kept, plotted in Engineer view, and is the series used for every number (segment deltas, invariant). The time-loss rate dΔt/dsd\Delta t/ds (shown as s per 100 m) is the derivative of the display series.

Where the time goes: segment deltas

Segments (corners and straights) are defined on the centerline curvature:

  • κ|\kappa| is smoothed over segment_curvature_smooth_m (10 m).
  • Corner where κ>|\kappa| > segment_corner_fraction (0.35) × max κ|\kappa|.
  • Cleanup in order: corner runs shorter than segment_blob_m (30 m) become straight; straight gaps shorter than segment_min_length_m (45 m) become corner; corners still shorter than 45 m become straight.
  • Each corner is split into entry / centre / exit, the centre being ± segment_center_fraction (15 %) of the arc around the curvature peak. On an oval the arcs are named Turn 1–2, Backstretch, Turn 3–4, Frontstretch in the direction of travel from the gate. If fewer than two corners are found the lap is divided into quarters and a note is shown.
  • Boundaries are stored as fractions of LL; user edits are kept separately and re-applied when the centerline is rebuilt.

The delta attributed to a segment [s0,s1][s_0, s_1] is

Δtseg=Δt(s1)Δt(s0)\Delta t_{seg} = \Delta t(s_1) - \Delta t(s_0)

on the unsmoothed Δt\Delta t, unwrapped through the gate: a segment that crosses start/finish adds Δt(L)\Delta t(L) for the wrap. Segment deltas therefore sum exactly to the final delta. A segment delta of 0.05 s or more is treated as notable (plan §19.2 segment_time_loss trigger).

Per-segment metrics for each lap (entry, minimum and exit speed, brake and acceleration points, sustained Cornering G and Chassis Load, mean line offset) are defined on the Speed, Cornering G and Chassis Load pages.

Low-confidence ranges

A grid point is low-confidence when either lap's projection confidence is below delta_low_confidence (0.5) or lies inside a GPS gap longer than 0.5 s. Such ranges are shaded on every lane and marked in the readout; segment summaries report the fraction of low-confidence points.

Reference lap

By default the reference is the fastest racing lap of the session and the comparison is the slowest racing lap. Any racing lap can be chosen for either role. Caution, pit, partial and invalid laps are never used in a delta.

Verified

  • Real fixtures: invariant holds for every racing-lap pair (error ≤ 1e-3 s, typically < 1e-6 s); delta noise on straights < 20 ms per 100 m; Hamilton County lap 4 vs lap 6 = +0.787 s with the largest loss in Turn 1–2 (+0.483 s), reproduced by the regression goldens (tests/regression/golden_phase10_segments.json).
  • Synthetic: two laps with a prescribed time-difference profile recover Δt(s)\Delta t(s) within 5 ms everywhere; different lines around the same oval give the analytic time difference at every ss.
  • Property test: for random pairs of real laps the invariant and the continuity bound hold.