Filtering
Every filter constant in this product was chosen on the real files from a candidate grid, with the
criteria and numbers written down, and then frozen in the parameter set v1-default. Changing one
requires a new parameter-set id and an algorithm-version bump.
Filter types and why
| need | filter | why |
|---|---|---|
| band-limit GPS speed | Butterworth order 2, applied forward and backward (sosfiltfilt; effective order 4, zero phase) |
no phase lag, so speed events stay aligned with the video and the IMU; second-order sections are numerically safe |
| band-limit accelerometer / gyro | Butterworth order 4 in second-order sections, zero phase | vehicle motion lives below ~3 Hz; engine, driveline and tyre vibration on a dirt car sits at ≥ 10–20 Hz |
| derivatives (longitudinal acceleration, heading rate, time-loss rate) | Savitzky–Golay derivative, order 2 | estimates the derivative from a local polynomial fit instead of differentiating noise |
| clipped accelerometer samples (±8 g rail) | replaced by an 11-sample rolling median before the IIR filter | so a rail sample does not ring through the recursive filter |
| statistical outlier removal on the IMU (Hampel) | disabled | see below |
| display smoothing of the lap delta | Savitzky–Golay, 10 m window, order 2, re-anchored at both ends | readability only; every number uses the unsmoothed series |
Boundaries: filters run per contiguous run with odd padding; the first and last 0.5 s of every run are
flagged EDGE and excluded from peak statistics. Runs are split at gaps larger than three sample
periods and never filled for the IMU; GPS gaps up to 0.5 s are linearly filled and flagged.
Selected values
| parameter | candidates | frozen | selection evidence |
|---|---|---|---|
speed_cutoff_hz |
0.5 / 1.0 / 2.0 Hz | 1.0 Hz | lowest cutoff with a near-white residual; brake/acceleration points move < 3 m vs the 2 Hz candidate; injected one-sample spike changes max speed < 0.1 m/s (Phase 6) |
sg_window_heading_s |
0.5 / 0.7 / 1.0 s | 1.0 s (+ 1 Hz zero-phase low-pass on the heading) | Cornering G noise 0.02–0.04 g (1σ) on straights, no corner bias (Phase 6) |
sg_window_long_s |
0.5 / 0.7 / 1.0 s | 0.7 s | synthetic acceleration ramp recovered within 3 % (Phase 6) |
imu_cutoff_hz |
3 / 5 / 8 / 10 Hz | 5 Hz | only 2–18 % of the raw specific-force energy lies below 10 Hz while racing; agreement and per-corner spread change by < 0.003 g / < 0.01 across candidates; 5 Hz keeps the < 3 Hz chassis band under the vibration floor (Phase 8) |
| Hampel on the IMU | (7, 3σ), (11, 3σ), (11, 5σ), (11, 8σ), off | off; rail samples replaced by the 11-sample median | (11, 3σ) replaced 6–9 % of racing samples and injected 0.09–0.12 g RMS of low-band error; even (11, 8σ) altered the low band locally by 0.4 g (Phase 8) |
sustained_window_s |
0.5 / 0.75 / 1.0 / 1.5 s | 1.0 s | per-corner lap-to-lap CV 0.06–0.09 for every candidate; 1.0 s is 8–16 % of a corner's duration; one 5 g sample moves the value ≤ 0.025 g (bound) / < 0.01 g (measured) (Phase 8) |
sustained_window_long_s |
0.3 / 0.5 / 0.75 s | 0.5 s | CV within 0.01; respects the 1–2 s braking-event duration (Phase 8) |
delta_display_smooth_m |
— | 10 m (11 grid points) | display only; the endpoint invariant is tested on the unsmoothed series |
Full tables: docs/proofs/phase-06/filter_selection.md and docs/proofs/phase-08/filter_selection.md
(PSD plots, criterion tables per candidate, per-session JSON).
What "sustained" means
The maximum sliding-window mean of the filtered channel magnitude. A spike of amplitude and duration can move it by at most . Peak-filtered and mean values are reported alongside; the raw peak is available in Engineer view labelled as such.
What the browser does and does not do
The interface applies no filtering. It converts units (m/s → mph, m/s² → g), reads the engine's grid value at the cursor (nearest 1 m grid point) and draws the display-smoothed delta the engine provides.