Track Configuration¶

Configure the track for your lap time simulations. Upload track data from CSV, apply filters and processing, and visualize the result.
Overview¶

The Track page is split into two columns:
- Left column — Track configuration (library, upload, filters, processing) and Ambient Conditions
- Right column — Track map visualization and trace charts
Track Configuration¶
The track configuration section uses the standard Setup Command Palette for saving, loading, and duplicating track setups from your library.
Uploading a Track from CSV¶

Click the Upload button to open the upload dialog. You can drag-and-drop a CSV file or browse to select one.
CSV Format¶

The CSV file must use comma-separated values with column headers in the first row. Do not include units in the headers.
Example headers:
An example CSV file is available for download from within the upload dialog.
Track Data Columns¶
| Column | Unit | Required | Description |
|---|---|---|---|
| Distance | m | Conditional | Cumulative distance along the track centerline. Required if X/Y coordinates are not provided. |
| Curvature | 1/m | Conditional | Track curvature at each point. Positive = left turn. Required if X/Y coordinates are not provided. |
| X_cord | m | Conditional | X coordinate of the track centerline. Required if Distance/Curvature are not provided. |
| Y_cord | m | Conditional | Y coordinate of the track centerline. Required if Distance/Curvature are not provided. |
| Banking | rad | Optional | Track banking angle. Defaults to 0. |
| Gradient | rad | Optional | Track gradient (slope) angle. Defaults to 0. Auto-calculated from Road Height if provided. |
| Road Height | m | Optional | Elevation of the track surface. Used to derive Gradient if Gradient is not supplied. |
| Grip | 0–1 | Optional | Surface grip multiplier. Defaults to 1. |
Coordinate Input Options
You can provide either Distance + Curvature or X/Y coordinates. If both are provided, X/Y coordinates take priority and Distance/Curvature are recalculated from them.
GPS Coordinates
GPS (latitude/longitude) coordinates are auto-detected and converted to local X/Y in meters. Place latitude values in X_cord and longitude values in Y_cord.
Processing Pipeline¶
Track data flows through a two-stage pipeline: Filters are applied first, then Processing.
flowchart LR
A[Raw CSV Data] --> B{Processing Enabled?}
B -->|Yes| C[Filters]
C --> D[Processing]
D --> E[Final Track]
B -->|No| E
A master toggle Enable Processing controls whether the pipeline runs. When disabled, the raw uploaded data is used directly in simulations.
Filter Options¶

Filters are applied before spline processing. They clean and adjust the raw data.
Smoothing¶
Smooths noisy data before spline fitting. Two methods are available:
Savitzky-Golay (Recommended)¶
Fits a polynomial to each sliding window and evaluates it at the center point. Unlike a simple moving average, this preserves curvature peaks in chicanes and tight corners — the polynomial can represent the parabolic shape of a peak without attenuating it.
| Parameter | Description |
|---|---|
| Window Length | Number of data points in the polynomial fit window. Must be odd. At 2m spacing, 11 covers ~22m of track. |
| Polynomial Order | Degree of the fitted polynomial. Order 3 (cubic) is recommended for most tracks. Must be less than window length. |
| Target Columns | Which columns to smooth: Curvature, Banking, Distance, Gradient, X & Y Coordinates. |
When to Use Savitzky-Golay
Use this for GPS-logged or Formula Student data where preserving the shape of tight corners matters. A moving average with the same window size would flatten a hairpin by ~15%, while Savitzky-Golay preserves it within ~1%.
Moving Average (Legacy)¶
Smooths data by averaging over a sliding window. Simple but can flatten curvature peaks.
| Parameter | Description |
|---|---|
| Window Size | Number of data points to average over. Larger values produce smoother results. |
| Target Columns | Which columns to smooth. |
Transform¶
Applies a linear transformation (scale and offset) to selected columns.
| Parameter | Description |
|---|---|
| Scalar | Multiplier applied to column values. Values of 0.95–1.05 are recommended for loop-closing adjustments. |
| Offset | Additive constant applied after scaling. |
| Target Columns | Which columns to transform. |
Clamp¶
Limits column values to a specified range, removing outliers. You can add multiple clamp configurations, each targeting a different column.
| Parameter | Description |
|---|---|
| Column | The data column to clamp. |
| Min Value | Lower bound — values below this are clamped. |
| Max Value | Upper bound — values above this are clamped. |
Clamp for Curvature
Clamping curvature is useful for removing GPS spikes or sensor glitches that produce unrealistically sharp corners.
Processing Options¶

Processing options are applied after filters. They interpolate and standardize the track geometry.
Step Size (m)¶
The distance increment for interpolated track points. We recommend a step size of 1–3 m. A step size of 3 m is ideal for faster lap time computation, particularly on longer circuits (above ~4 km).
The step size should match or be coarser than the spacing in your supplied data. Setting it finer than your raw data resolution adds noise without improving accuracy.
Step Size and Simulation Granularity
A very coarse step size (e.g., 10 m) produces granular lap simulation results — the solver has fewer points to work with and corner entry/exit speeds become less accurate. Conversely, a very fine step size on a long circuit increases computation time significantly.
Validation: Step size must be ≥ 0.1 m.
Order of B-Splines¶
The polynomial degree used for spline approximation, from 1 (linear) to 5 (quintic).
| Order | Description |
|---|---|
| 1 | Linear interpolation — no smoothing. Suitable for straight-line tracks only. |
| 2 | Quadratic — not recommended (even orders can produce artifacts with small smoothing). |
| 3 | Cubic — decent default. Good balance of smoothness and fidelity for most circuits. |
| 4 | Quartic — not recommended. |
| 5 | Quintic — highly recommended for larger circuits. Most accurately captures corners and chicanes, especially when combined with Curvature Optimization. |
Choosing the Right Order
- Use order 1 only for straight tracks (constant-curvature or zero-curvature sections).
- Use order 3 as a starting point for general circuits.
- Use order 5 for longer or more complex circuits — it captures tight corner sequences and chicanes more faithfully than cubic splines.
- Odd-degree splines (3, 5) generally behave better than even degrees (2, 4), especially with small smoothing factors.
Spline Stiffness¶
Controls how aggressively the B-spline smooths the track geometry. When disabled (default), the stiffness is automatically calculated based on the number of track points. When enabled, you can manually set the value.
- Lower values (e.g., 5–50) preserve tight corners and chicanes but are more sensitive to noise.
- Higher values (e.g., 200+) produce smoother curves but may flatten sharp features.
- Auto (toggle off) scales with the track point count — works well for most cases but can over-smooth small circuits.
Formula Student Tracks
FS circuits are typically short (300–500m) with tight corners. The auto stiffness often over-smooths these. Try setting stiffness to 10–30 with the Savitzky-Golay pre-filter enabled for the best results.
Circuit Closed¶
When enabled, the track start and end points are smoothly connected to form a continuous loop. Disable this for non-circuit tracks (e.g., hillclimbs, point-to-point stages).
How the Stretching Method Works¶
Real-world track data rarely closes perfectly — the last recorded point almost never lands exactly on the first. The closure algorithm corrects this gap without distorting the track shape.
The algorithm works in two phases:
-
Heading correction — It calculates the heading (direction of travel) at every point along the track. If there is a heading error between the start and end (i.e., the track doesn't point back the way it started), this error is distributed linearly along the entire track length. Each point's heading is adjusted by a small fraction of the total error, proportional to its distance along the track. The track coordinates are then reconstructed from these corrected headings.
-
Position correction — After heading correction, a small positional gap may remain between the reconstructed start and end points. This residual gap is removed by applying a linear spatial shift distributed along the track — points near the start are barely moved, while points near the end absorb most of the correction. The final point is then snapped exactly to the start position.
The result is a smoothly closed circuit where the correction is spread across the entire track rather than concentrated at the join point. This preserves the original track shape while ensuring the circuit forms a proper loop.
Already Closed Tracks
If the start and end points are already within 1 meter of each other, the algorithm skips closure — the track is considered already closed.
Curvature Optimization¶
Curvature optimization uses quadratic programming (QP) to produce a smoother curvature profile. This is particularly useful for GPS-sourced track data where sensor jitter introduces noise into the curvature.
How It Works¶
At each point along the processed track, the spline fitting step produces a normal vector — a direction perpendicular to the track centerline. The optimizer is allowed to shift each point laterally along its normal vector (left or right) by a bounded amount, constrained by the track width so that the shifted point remains within the track boundaries.
The optimizer solves a QP problem to find the set of lateral shifts that minimizes curvature variation across all points simultaneously. It uses a curvature_matching objective by default, which penalizes deviations in the shift profile's second derivative relative to the reference curvature — effectively smoothing out noise while preserving the genuine shape of corners.
The key constraints are:
- Track boundaries — Each point's lateral shift is bounded by the track width (minus half the vehicle width as a safety margin). Points cannot be moved outside the track edges.
- Continuity — The QP formulation uses finite-difference approximations of second derivatives, ensuring the resulting path remains smooth rather than producing abrupt jumps.
The result is a track centerline with a cleaner curvature profile that still faithfully follows the physical track layout. Genuine corners are preserved; GPS noise and small jitters are removed.
When to Use Curvature Optimization
Enable this when your track data comes from GPS logging or other noisy sources. It pairs well with order 5 B-splines for the best results on complex circuits. For clean, hand-measured or CAD-sourced track data, optimization is usually unnecessary.
Curvature Quality and Lap Time Accuracy¶
Curvature Directly Drives Lap Time Results
The curvature profile is the single most important input to the QSS lap time simulation. The solver uses curvature at every point to determine the maximum cornering speed — noisy or inaccurate curvature leads to unrealistic speed traces and incorrect lap times.
Spend time making the curvature profile smooth and realistic before running simulations. Use the trace charts to inspect the curvature channel visually. Look for:
- Spikes or oscillations — signs of GPS noise or insufficient smoothing. Apply moving average filters, increase B-spline order, or enable curvature optimization.
- Flat curvature in corners — the spline may be over-smoothing. Reduce the step size or use a higher-order spline to capture the corner shape.
- Discontinuities at the start/finish — enable Circuit Closed to eliminate the join artifact.
A smooth, accurate curvature profile is the foundation of realistic lap time simulation results.
Sectors¶
Sectors divide the track into segments for per-sector analysis — sector times, speeds, g-forces, and energy usage are computed for each sector independently.
Automatic Sectoring¶
By default, sectors are detected automatically from curvature sign changes (left turn → right turn transitions). This produces a reasonable breakdown but may not match official timing sectors.
Manual Sectors¶
Open the Sectors section in the track configuration to define your own sector boundaries by start and end distance (in metres). Use the "Add N sectors" input to quickly create multiple sectors.
- Toggle Sectors in the track map display controls to visualise sector boundaries with colour-coded segments.
- The coverage indicator warns if your sectors don't cover the full track length.
- Sectors are numbered automatically (S1, S2, S3...) and flow through to all per-sector metrics in simulation results.
Sectors and Metrics
Manual sectors override automatic detection. When defined, all simulation metrics (sector times, speeds, energy) use your sector boundaries. When empty, the automatic curvature-based sectors are used.
Tips and Troubleshooting¶
Noisy Data (Formula Student / GPS)¶
GPS-logged track data often contains noise that causes unrealistic speed profiles. Recommended approach:
- Enable Savitzky-Golay smoothing under Pre-Processing Filters — preserves curvature peaks while removing noise.
- Set a lower Spline Stiffness (5–50) — keeps the trajectory closer to your original data.
- Increase B-Spline Order to 5 — produces smoother curvature transitions for the lap time simulation.
Smooth Speed Profiles in QSS¶
The QSS lap time simulation is very sensitive to curvature noise — small spikes create unrealistic acceleration jumps. Key controls:
- Spline Stiffness is the primary lever. Higher = smoother but may flatten chicanes.
- B-Spline Order 5 generally produces smoother curvature rate-of-change than order 3.
- Curvature Optimization shifts points laterally to reduce curvature variation while respecting track boundaries. Enable this if you see the processed track deviating from the original shape.
Loop Closure Distortion¶
If the closure algorithm distorts your track shape:
- Use Transform — apply a small scalar (0.99–1.01) to X & Y coordinates to bring the start/end points closer together before the closure algorithm runs.
- Check your source data — if the gap exceeds 5% of track length, consider trimming or extending your logged data.
- Disable Circuit Closed for open-ended tracks (hillclimbs, drag strips).
Processing Pipeline Order¶
Understanding the order helps diagnose issues:
- Pre-Processing Filters — Smoothing, Transform, Clamp applied to raw input
- Coordinate Generation — if data is Distance + Curvature, X/Y are reconstructed
- Loop Closure — start/end points joined (if Circuit Closed is on)
- B-Spline Fitting — smooth curve fitted through points (Step Size, Spline Order, Spline Stiffness)
- Curvature Optimization — optional QP smoothing (if enabled)
- Sector Assignment — automatic or manual sector boundaries applied
Filter Interaction with Data Format
For Distance + Curvature tracks, smoothing the curvature column changes the reconstructed X/Y path — the filter has a real effect. For X/Y coordinate tracks, smoothing the curvature column has no effect because the B-spline re-derives curvature from the fitted curve. In this case, consider smoothing the X & Y columns directly.
Track Visualization¶
The right side of the Track page displays the track map and trace charts.
Display Toggles¶
| Toggle | Description |
|---|---|
| Raw Track | Shows the unprocessed track data on the map. |
| Processed Track | Shows the filtered and processed track data. |
| Flat View | Removes elevation from the visualization. Only appears when the track has height data. |
| Sectors | Colour-codes the track by sector boundaries. Only appears when sectors are defined. |
Layout Presets¶
| Layout | Description |
|---|---|
| Split View | Track map and trace charts side by side. |
| Track Only | Full-screen track map. |
| Trace Only | Full-screen trace charts. |
A Trace Selector lets you choose which data channels (curvature, banking, gradient, etc.) to display in the trace charts. Deselected channels are hidden, and rows with no visible channels are removed from the chart area.
Validation Notes¶
- Step size must be ≥ 0.1 m
- B-spline order must be between 1 and 5 (odd orders recommended)
- CSV must contain either Distance + Curvature or X/Y coordinates
- Grip values of 0 are automatically replaced with a small positive value (0.001)
- Banking and Gradient values > 1 are assumed to be in degrees and auto-converted to radians
Related Topics¶
- Ambient Conditions — Air density, engine efficiency, and wind speed
- Aerodynamics Setup — Track-specific aero requirements
- Lap Time Simulation — Run simulations on your track
- Results — Analyze simulation output