Skip to main content

Motorsport Telemetry

What is motorsport telemetry?​

Motorsport telemetry is the data a race car, or a racing simulator, records about every moment of a lap: speed, pedal positions, steering, gear, engine speed, g-forces and position on the track. Drivers and engineers chart it as lap traces against distance and compare laps, to find where and why one lap is faster.

Two real laps of the same circuit compared in a dark navy theme: stacked speed, throttle, brake, gear and time-delta traces against lap distance on the left, with the faster lap in blue and the slower lap in orange; on the right, a track map coloured by where the slower lap loses time, a polar g-g diagram and a polar speed gauge

Two laps of the same circuit from a racing simulator, recorded at a SciChart demo and anonymised: speed, throttle, brake, gear and the time delta against distance, with a track map and two polar charts. Try the interactive version.

Key takeaways
  • Telemetry channels are logged against time, then plotted against lap distance, so every lap's corners line up.
  • Each corner reads as a pattern: braking point, peak brake pressure, release, minimum speed, throttle pickup, full throttle.
  • The time-delta trace is the gap to a reference lap at each point on the track. A rising line means time lost.
  • A slow corner exit costs time all the way down the next straight, so the delta keeps climbing after the corner.
  • In the example on this page, two corners account for 1.7 of the 2.7 seconds between the laps.

The same methods apply to a club car with a data logger, a professional team's car, a kart and a racing simulator. Racing teams call the whole discipline data acquisition: the sensors, the logger that records them, and the analysis afterwards. Telemetry, strictly, is the subset sent live to the pit wall by radio; most analysis is done on the full logged data once the car is back in the garage. For the wider engineering meaning, see telemetry.

What does motorsport telemetry record?​

Every sensor becomes a channel: a series of values with a unit and its own sample rate. These are the channels most lap analysis uses.

ChannelUnitWhat it tells youMinimum suggested logging rate
Speed (GPS or wheel speed)km/h or mphHow fast the car is at each point; corners show as dips10 Hz (GPS), 20 Hz (wheel speed)
Throttle position%How far the accelerator pedal is pressed20 Hz
Brake pressurebar or %When braking starts, how hard, and how it is released20 Hz
Steering angledegreesHow much lock the driver uses; corrections show as saw-tooth wiggles20 Hz
Gear1, 2, 3…Gear changes and the gear used through each corner10 Hz
Engine speedrpmShift points, and wheelspin as a sudden rise20 Hz
Lateral and longitudinal ggCornering, braking and acceleration forces20 Hz
Position (GPS or the game's world coordinates)metresThe racing line, for a track map10 Hz
Lap distancemetresWhere on the lap each sample was takenDerived from speed or position

The rates in the last column are the minimums suggested by High Performance Academy's data-logging guide; suspension movement needs much more, at least 250 Hz. The laps on this page were logged by the simulator at roughly 30 samples a second, about one sample every 2.8 m at 300 km/h.

Why are lap traces plotted against distance, not time?​

A logger records each sample with a time stamp. For comparing laps, though, the x-axis is almost always lap distance: metres from the start line.

Two laps are only comparable at the same place on the track. A lap that is 0.2 seconds slower into the first corner reaches the second corner 0.2 seconds later, the third later still, and so on. On a time axis, the slower lap's braking points drift further right with every corner, and by mid-lap you are comparing one car's braking with the other car's straight. On a distance axis, corner 4 is at the same x position for every lap, so the traces overlay and any difference is a real difference in driving.

To plot by distance, each lap's samples are matched to distance: integrate speed over time, or use the distance channel the logger or game provides. Lap distance has its own error, especially from wheel-speed integration over a long lap. Mitchell's SAE paper on data alignment shows laps lined up to within about a metre by matching patterns in the data, such as suspension movement over bumps, instead of trusting distance alone.

The time-delta trace then turns the difference between two laps back into seconds at each point on the track.

How to read a corner in lap traces​

Every corner leaves the same pattern in the speed, brake and throttle traces.

Speed, brake and throttle traces through one corner, against distance: speed falls from the braking point to the minimum corner speed at the apex and rises on the exit; brake pressure jumps to its peak at the braking point and is released gradually into the corner; the throttle drops to zero, stays at zero through a short coast, then rises from the throttle pickup to full throttle

  • Braking point. The throttle trace drops and the brake trace jumps, usually within a few metres of each other. A later braking point means more time at full speed; the limit is whether the car can still make the corner.
  • Peak pressure and release. A sharp rise to peak pressure uses the tyres' grip while the car is fastest and most stable. Easing off the brake gradually as the steering goes in is trail braking: it keeps weight on the front tyres and helps the car turn.
  • Minimum corner speed. The bottom of the dip in the speed trace, usually near the apex, the point where the car comes closest to the inside of the corner. A V-shaped dip means the driver braked late and turned sharply; a wider, rounder dip means more speed carried through a longer arc.
  • Coasting. A gap where neither pedal is pressed. The car is slowing on drag alone, which is slower than braking and slower than accelerating, so a long coast usually marks hesitation.
  • Throttle pickup and full throttle. How soon the throttle goes back down, and how quickly it reaches 100%. A stepped or wavering rise suggests the car is sliding or the driver is unsure of the grip.
  • Gear changes. Downshifts appear as steps during braking; the lowest gear sits at the minimum speed. Using a gear lower or higher than the reference lap often explains a different exit speed.

Read the traces together, never one at a time: a lower minimum speed might come from braking too early, braking too late and running wide, or a mistake at the apex. The brake and throttle traces say which.

What is the time-delta trace?​

The time-delta trace (also called delta, time slip or variance) shows the running time gap between two laps at each point on the track. At distance d, it is the time the comparison lap took to reach d minus the time the reference lap took to reach the same d.

To compute it, you need each lap's elapsed time against distance. For each sample of the reference lap at distance d, find the comparison lap's time at the same d by interpolating between its two nearest samples, and subtract. The two laps never have samples at exactly the same distances, so this interpolation is the step that aligns them.

How to read it:

  • The value is the gap so far. At the finish line it equals the difference in lap times.
  • The slope shows where the gap changes. A rising line means the comparison lap is losing time there; a falling line means it is gaining. A flat line means both laps are equally fast through that stretch.
  • Steep rises usually start at a corner and keep going down the following straight, because a slower exit speed costs time all the way to the next braking point.

Worked example: where Lap B loses 2.7 seconds​

The two laps in this guide's demo were driven by two different drivers on the same circuit in a racing simulator. Lap A took 82.010 s and Lap B 84.738 s, so Lap B finishes 2.728 s behind. Lap B was slower in every sector: by 0.583 s, 0.691 s and 1.454 s.

At 1,800 m, just before corner 4, Lap A has taken 29.18 s and Lap B 29.90 s: a delta of 0.72 s. At 2,400 m, after the straight that follows, the times are 38.27 s and 39.65 s: a delta of 1.38 s. Lap B lost 0.67 s in those 600 m, most of it on the straight, after the corner itself.

The table splits the lap into zones, each running from halfway after the previous corner to halfway after this one, and gives the change in delta across each. The zones add up to the 2.73 s gap, give or take rounding.

Corner (distance)Minimum speed, Lap A / Lap BTime Lap B losesWhat the traces show
1 (356 m)155 / 155 km/h0.03 sLap B brakes slightly later and lighter, carries up to 35 km/h more into the corner and is 0.19 s ahead by 380 m, but reaches full throttle 40 m later and gives it all back on the exit
2 and 3 (1,110–1,265 m)107 / 98 and 139 / 142 km/h0.52 sA slower first apex in the chicane
4 (1,884 m)168 / 153 km/h0.83 sBraking within 6 m of Lap A, but 15 km/h less at the apex and full throttle 40 m later; Lap B's lateral g spikes to over 9 g there, most likely a kerb strike
5 and 6 (3,309–3,454 m)204 / 207 and 227 / 222 km/h0.08 sAlmost identical
7 (4,148 m)112 / 89 km/h0.38 s23 km/h slower at the apex
8 (4,409 m)199 / 198 km/h0.06 sAlmost identical
9 (4,675 m)90 / 61 km/h0.83 sSame braking point, but Lap B stays on the brake past Lap A's release and slows to 61 km/h

Corners 4 and 9 cost Lap B 1.66 s, about 60% of the gap. In both, Lap B starts braking where Lap A does; the time goes at the apex and on the exit. A coach would work on those two corners first. At corner 1, Lap B's later, deeper entry gains time for a moment and loses it again on the exit.

These figures come from the demo's data. The delta uses elapsed times derived from each lap's logged speed and distance, scaled to the official lap times. Corner numbers are this guide's own, for the slower corners only.

Track maps and the g-g diagram​

A track map draws the racing line from the car's position channels (GPS on a real car, world coordinates in a simulator). Coloured by speed, it shows the braking zones and slow corners at a glance. Coloured by the slope of the time delta, it shows where on the circuit the comparison lap gains or loses time, which is often easier to discuss with a driver than a trace. A marker that follows the cursor on the traces links the two: hover over a dip in the speed trace and the map shows which corner it is.

A g-g diagram, also called a friction circle, plots each sample's lateral g against its longitudinal g. Every point is one moment of the lap. The edge of the cloud is the car's grip limit: braking at the bottom, acceleration at the top (limited by engine power as well as grip), cornering at the sides. A driver who uses the tyres fully traces the outline of that envelope, blending braking into cornering; gaps in the edge, especially at the diagonals, show where grip was left unused. Drawn as a polar chart, the angle is the direction of the force and the distance from the centre is its size.

How to compare laps​

Compare laps against a well-chosen reference, starting with the corners where the delta trace rises most steeply.

  • Pick a reference lap. Usually your own best lap, a team-mate's best, or a coach's lap in the same car and conditions. A reference from a different car, tyre or fuel load tells you about the car, not the driving.
  • Find the biggest losses first. Read the delta trace for its steepest rises, then go to those corners in the speed, brake and throttle traces. Fixing the two corners that cost the most is worth more than polishing all of them.
  • Change one thing at a time. Brake 5 m later in one corner, then compare again.
  • Check consistency over many laps. Overlay ten laps from one session: where the traces spread apart, the driver isn't repeating the corner the same way, and the best lap there may be luck. A consistent corner that is still slow is a technique or set-up question.
  • Watch the exits. Minimum speed and throttle pickup set the speed for the whole of the next straight.

Sim racing telemetry vs real car data acquisition​

Simulator telemetry and real-car data show the same channels, but they come from different sources and differ in rate, accuracy and noise.

Racing simulatorReal race car
Where the data comes fromThe game's physics engine, sent as UDP packets over the network or written to a fileSensors wired to a data logger in the car
ChannelsEverything the physics model knows, including tyre temperatures and positions in world coordinatesOnly the sensors fitted; more sensors mean more cost and weight
Sample rateFixed by the game, often a few dozen packets a secondSet per channel, from 1 Hz for temperatures to hundreds of hertz for suspension
Noise and errorsClean values, no sensor faultsSensor noise, drift, dropouts and calibration errors
Live linkThe whole stream, on the same computer or networkUsually a subset sent by radio; the full log is downloaded after the session
Typical useLearning a track, coaching, comparing with other drivers' lapsEngineering the car and coaching the driver

The traces read the same way, so sim racing is a cheap way to learn telemetry analysis. Whichever the source, the data is a set of time series, displayed live as strip charts and analysed afterwards lap by lap. For storing and sending it efficiently, see time series data formats.

Common lap comparison mistakes​

Most lap comparison mistakes come from misaligned laps or from reading the delta trace the wrong way.

  • Using time as the x-axis. The laps drift apart corner by corner, and by mid-lap you are comparing different parts of the track. Plot against lap distance.
  • Comparing laps that aren't aligned. If one lap's distance channel starts from a different line or has drifted, braking points appear tens of metres apart when they aren't. Line laps up at the start line and check that a known feature, such as a hard braking point, sits at the same distance in both.
  • Reading the delta's height instead of its slope. A delta of 1.4 s at 3,000 m doesn't mean the driver is losing time there; on the example lap it was lost at corner 4 and the line is flat after it. Look for where the line rises.
  • Blaming the braking point for every lost corner. In the example, Lap B brakes where Lap A does in its two worst corners. The loss is at the apex and on the exit.
  • Comparing against one lap only. A single reference lap can contain a lucky corner, and a single lap of yours can contain a one-off mistake. Compare several laps before changing anything.
  • Trusting single-sample spikes. A kerb strike can show as a 9 g spike that the car never sustained. Zoom in before believing an extreme value.
  • Downsampling the traces naively. Drawing every 10th sample of a long session can hide a short lock-up or a gear change. Use a downsampling method that keeps peaks, or a renderer that draws every point.

How to build a lap comparison dashboard in JavaScript, React or Angular​

A lap comparison lines up several laps of thousands of samples in synchronised panes that share one cursor, zoom and pan. SciChart built a full racing telemetry dashboard this way with SciChart.js, with more than 30 live charts, replay and lap analysis, and ran it live at the WeAreDevelopers World Congress in Berlin in 2026. It is shown in this video:

SciChart's real-time racing telemetry dashboard: 30+ live charts and post-race lap analysis

That dashboard receives the simulator's telemetry as a plain JSON stream, which is fine at these data rates. A Web Worker turns each message into one Float64Array per channel before it reaches the charts. For higher rates or longer recordings, binary, columnar and compressed formats load faster: see time series data formats.

The demo below is a small subset of that dashboard, with the two real laps from the worked example embedded in the page. Hover over any trace: the crosshair, the track map marker, the g-g diagram and the speed gauge all follow. Use Zoom to to jump to a corner, and Colour the track map by to switch between where Lap B gains or loses time and Lap A's speed. Press Replay both laps to watch both cars at the same moment of their laps, with the gap in metres. The mouse wheel zooms all five panes together, dragging pans them, and a double-click shows the whole lap again.

Here is the code. The lap data is stored as compact binary columns in base64 (about 53 KB for both laps) and decoded into typed arrays; SciChart.js draws the panes, the map and the polar charts.

// Motorsport lap comparison with SciChart.js: lap traces against distance, a time-delta trace, a track map,
// a polar g-g diagram and a polar speed gauge, all following one cursor, plus a replay of both laps
const {
SciChartSurface,
SciChartPolarSurface,
SciChartVerticalGroup,
NumericAxis,
PolarNumericAxis,
NumberRange,
EAutoRange,
EAxisAlignment,
EPolarAxisMode,
EXyDirection,
EStrokePaletteMode,
EHorizontalAnchorPoint,
EVerticalAnchorPoint,
EMultiLineAlignment,
FastLineRenderableSeries,
XyScatterRenderableSeries,
PolarXyScatterRenderableSeries,
EllipsePointMarker,
XyDataSeries,
DefaultPaletteProvider,
parseColorToUIntArgb,
VerticalLineAnnotation,
HorizontalLineAnnotation,
NativeTextAnnotation,
PolarArcAnnotation,
SciChartJsNavyTheme,
CursorModifier,
LegendModifier,
ELegendOrientation,
MouseWheelZoomModifier,
ZoomPanModifier,
ZoomExtentsModifier,
CustomChartModifier2D
} = SciChart;
// or, for npm, import { SciChartSurface, ... } from "scichart"

// --- 1. Decode each lap: base64 -> bytes -> typed columns (6 Int16 columns, then 3 Uint8 columns) ---
function decodeLap(base64) {
const bytes = Uint8Array.from(atob(base64), (ch) => ch.charCodeAt(0));
const n = bytes.length / 15; // 15 bytes per sample
const view = new DataView(bytes.buffer);
const int16 = (block, scale, unsigned = false) =>
Float64Array.from({ length: n }, (_, i) => {
const offset = block * 2 * n + 2 * i;
return (unsigned ? view.getUint16(offset, true) : view.getInt16(offset, true)) / scale;
});
const uint8 = (block) => Float64Array.from(bytes.subarray(12 * n + block * n, 12 * n + (block + 1) * n));
return {
distance: int16(0, 4, true), // m from the start line, stored in quarter metres
speed: int16(1, 1), // km/h
x: int16(2, 10), // track position (m), for the map
z: int16(3, 10),
gLat: int16(4, 100), // lateral g
gLon: int16(5, 100), // longitudinal g: + accelerating, - braking
throttle: uint8(0), // %
brake: uint8(1), // %
gear: uint8(2)
};
}

// Linear interpolation of ys at x, over xs sorted ascending
function interpolate(xs, ys, x) {
let lo = 0;
let hi = xs.length - 1;
if (x <= xs[lo]) return ys[lo];
if (x >= xs[hi]) return ys[hi];
while (hi - lo > 1) {
const mid = (lo + hi) >> 1;
if (xs[mid] <= x) lo = mid;
else hi = mid;
}
return ys[lo] + ((x - xs[lo]) / (xs[hi] - xs[lo])) * (ys[hi] - ys[lo]);
}

// --- 2. Elapsed time at each sample: add up distance / speed, then scale to the lap's official time
// (the logged speed is rounded to whole km/h, so the raw sum runs about 1.6% long) ---
function addElapsedTime(lap, lapTime) {
const { distance, speed } = lap;
const n = distance.length;
const time = new Float64Array(n);
time[0] = distance[0] / (speed[0] / 3.6);
for (let i = 1; i < n; i++) {
const metresPerSecond = (speed[i] + speed[i - 1]) / 2 / 3.6;
time[i] = time[i - 1] + (distance[i] - distance[i - 1]) / metresPerSecond;
}
const finish = time[n - 1] + (TRACK_LENGTH - distance[n - 1]) / (speed[n - 1] / 3.6);
for (let i = 0; i < n; i++) time[i] *= lapTime / finish;
return { ...lap, time };
}

const [lapA, lapB] = [LAP_A_DATA, LAP_B_DATA].map((data, i) => addElapsedTime(decodeLap(data), LAPS[i].lapTime));

// --- 3. The time delta: at each of Lap A's distances, Lap B's time minus Lap A's time.
// Positive = Lap B is behind; where the line rises, Lap B is losing time ---
const delta = Float64Array.from(lapA.distance, (d, i) => interpolate(lapB.distance, lapB.time, d) - lapA.time[i]);

// --- 4. Five lap-trace panes, stacked, sharing one distance axis ---
const fullLap = () => new NumberRange(0, TRACK_LENGTH);
const paneSpecs = [
{ title: "Speed (km/h)", range: new NumberRange(10, 340), channel: "speed", legend: true },
{ title: "Throttle", range: new NumberRange(-5, 108), channel: "throttle", postfix: "%" },
{ title: "Brake", range: new NumberRange(-5, 108), channel: "brake", postfix: "%" },
{ title: "Gear", range: new NumberRange(1.5, 8.7), channel: "gear" },
{ title: "Delta (s)", range: new NumberRange(-0.6, 3.1), channel: "delta", precision: 2 }
];
const group = new SciChartVerticalGroup(); // lines up the panes' y-axes, so their x-axes match
const panes = [];
let onCursor = (distance) => {}; // set below, once the map and polar charts exist

// Reports the distance under the mouse, so the map and polar charts can follow the cursor
class DistanceCursorModifier extends CustomChartModifier2D {
modifierMouseMove(args) {
super.modifierMouseMove(args);
const surface = this.parentSurface;
const x = args.mousePoint.x - surface.seriesViewRect.x;
if (x >= 0 && x <= surface.seriesViewRect.width) {
onCursor(surface.xAxes.get(0).getCurrentCoordinateCalculator().getDataValue(x));
}
}
}

for (const [index, spec] of paneSpecs.entries()) {
const { sciChartSurface, wasmContext } = await SciChartSurface.create(ui.traceDivs[index], {
theme: new SciChartJsNavyTheme()
});
const isLast = index === paneSpecs.length - 1;
const xAxis = new NumericAxis(wasmContext, {
axisTitle: isLast ? "Lap distance (m)" : undefined,
drawLabels: isLast,
autoRange: EAutoRange.Never,
visibleRange: fullLap(),
labelPrecision: 0,
drawMinorGridLines: false
});
sciChartSurface.xAxes.add(xAxis);
sciChartSurface.yAxes.add(
new NumericAxis(wasmContext, {
axisTitle: spec.title,
axisTitleStyle: { fontSize: 13 },
autoRange: EAutoRange.Never,
visibleRange: spec.range,
maxAutoTicks: 4,
labelPrecision: spec.precision ?? 0,
labelPostfix: spec.postfix ?? "",
drawMinorGridLines: false
})
);

if (spec.channel === "delta") {
sciChartSurface.annotations.add(new HorizontalLineAnnotation({ y1: 0, stroke: "#FFFFFF66", strokeDashArray: [4, 4] }));
sciChartSurface.renderableSeries.add(
new FastLineRenderableSeries(wasmContext, {
dataSeries: new XyDataSeries(wasmContext, {
dataSeriesName: "Lap B − Lap A",
xValues: lapA.distance,
yValues: delta,
isSorted: true,
containsNaN: false
}),
stroke: "#F6E05E",
strokeThickness: 2
})
);
} else {
[lapA, lapB].forEach((lap, i) =>
sciChartSurface.renderableSeries.add(
new FastLineRenderableSeries(wasmContext, {
dataSeries: new XyDataSeries(wasmContext, {
dataSeriesName: LAPS[i].name,
xValues: lap.distance,
yValues: lap[spec.channel],
isSorted: true,
containsNaN: false
}),
stroke: LAPS[i].colour,
strokeThickness: 2,
isDigitalLine: spec.channel === "gear" // gear changes are steps
})
)
);
}
if (spec.channel === "speed") {
// Corner numbers along the bottom of the speed pane
CORNERS.forEach((d, i) =>
sciChartSurface.annotations.add(
new NativeTextAnnotation({
x1: d,
y1: 14,
text: String(i + 1),
fontSize: 12,
textColor: "#E8EDF5",
horizontalAnchorPoint: EHorizontalAnchorPoint.Center,
verticalAnchorPoint: EVerticalAnchorPoint.Bottom
})
)
);
}
// Replay markers: where each car is at the same moment, one dashed line per lap
const replayLines = LAPS.map(
(lap) => new VerticalLineAnnotation({ x1: 0, stroke: lap.colour, strokeThickness: 2, strokeDashArray: [5, 3], isHidden: true })
);
sciChartSurface.annotations.add(...replayLines);

sciChartSurface.chartModifiers.add(
new CursorModifier({
modifierGroup: "laps", // the crosshair follows on every pane
showTooltip: true,
showYLine: false,
tooltipContainerBackground: "#14233CDD",
tooltipDataTemplate: (seriesInfos) => seriesInfos.map((info) => `${info.seriesName}: ${info.formattedYValue}`)
}),
new DistanceCursorModifier(),
new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }),
new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),
new ZoomExtentsModifier({
xyDirection: EXyDirection.XDirection,
onZoomExtents: () => {
panes.forEach((pane) => (pane.xAxis.visibleRange = fullLap()));
return false;
}
})
);
if (spec.legend) sciChartSurface.chartModifiers.add(new LegendModifier({ showCheckboxes: false, orientation: ELegendOrientation.Horizontal }));
group.addSurfaceToGroup(sciChartSurface);
panes.push({ sciChartSurface, xAxis, replayLines });
}
// Zooming or panning one pane moves the others
for (const pane of panes) {
pane.xAxis.visibleRangeChanged.subscribe(({ visibleRange }) => {
for (const other of panes) {
if (other !== pane && !other.xAxis.visibleRange.equals(visibleRange)) other.xAxis.visibleRange = visibleRange;
}
});
}

// --- 5. Track map: the racing line from the x and z positions, coloured point by point ---
const map = await SciChartSurface.create(ui.mapDiv, { theme: new SciChartJsNavyTheme() });
const mapX = new NumericAxis(map.wasmContext, { isVisible: false, autoRange: EAutoRange.Never });
const mapY = new NumericAxis(map.wasmContext, { isVisible: false, autoRange: EAutoRange.Never });
map.sciChartSurface.xAxes.add(mapX);
map.sciChartSurface.yAxes.add(mapY);
let mapColours = new Uint32Array(lapA.x.length);
const trackPalette = new DefaultPaletteProvider();
trackPalette.strokePaletteMode = EStrokePaletteMode.GRADIENT;
trackPalette.overrideStrokeArgb = (x, y, index) => mapColours[index];
map.sciChartSurface.renderableSeries.add(
new FastLineRenderableSeries(map.wasmContext, {
dataSeries: new XyDataSeries(map.wasmContext, { xValues: lapA.x, yValues: lapA.z }),
strokeThickness: 5,
paletteProvider: trackPalette
})
);
CORNERS.forEach((d, i) =>
map.sciChartSurface.annotations.add(
new NativeTextAnnotation({
x1: interpolate(lapA.distance, lapA.x, d) + 45,
y1: interpolate(lapA.distance, lapA.z, d),
text: String(i + 1),
fontSize: 13,
textColor: "#FFFFFF",
horizontalAnchorPoint: EHorizontalAnchorPoint.Center,
verticalAnchorPoint: EVerticalAnchorPoint.Center
})
)
);
// One marker per lap, moved by the cursor or the replay
const carMarkers = LAPS.map((lap) => {
const dataSeries = new XyDataSeries(map.wasmContext, { xValues: [0], yValues: [0] });
map.sciChartSurface.renderableSeries.add(
new XyScatterRenderableSeries(map.wasmContext, {
dataSeries,
pointMarker: new EllipsePointMarker(map.wasmContext, { width: 14, height: 14, fill: lap.colour, stroke: "#FFFFFF", strokeThickness: 2 })
})
);
return dataSeries;
});

// Keep the map's x and z scales equal, so the circuit isn't stretched, whatever the size of its div
const fitTrack = () => {
const { width, height } = ui.mapDiv.getBoundingClientRect();
if (!width || !height) return;
const [minX, maxX, minZ, maxZ] = [Math.min(...lapA.x), Math.max(...lapA.x), Math.min(...lapA.z), Math.max(...lapA.z)];
const metresPerPixel = Math.max((maxX - minX) / width, (maxZ - minZ) / height) * 1.12;
mapX.visibleRange = new NumberRange((minX + maxX) / 2 - (metresPerPixel * width) / 2, (minX + maxX) / 2 + (metresPerPixel * width) / 2);
mapY.visibleRange = new NumberRange((minZ + maxZ) / 2 - (metresPerPixel * height) / 2, (minZ + maxZ) / 2 + (metresPerPixel * height) / 2);
};
const resizeObserver = new ResizeObserver(fitTrack);
resizeObserver.observe(ui.mapDiv);

// Colour ramps: speed from blue (slow) to red (fast); time from green (Lap B gaining) through grey to red (losing)
const ramp = (t, stops) => {
const p = Math.max(0, Math.min(1, t)) * (stops.length - 1);
const i = Math.min(stops.length - 2, Math.floor(p));
const mix = (a, b) => Math.round(a + (b - a) * (p - i));
const [a, b] = [stops[i], stops[i + 1]];
return parseColorToUIntArgb(`rgb(${mix(a[0], b[0])},${mix(a[1], b[1])},${mix(a[2], b[2])})`);
};
const SPEED_STOPS = [[59, 130, 246], [34, 211, 238], [34, 197, 94], [234, 179, 8], [239, 68, 68]];
const DELTA_STOPS = [[46, 204, 113], [110, 120, 140], [255, 77, 77]];
function colourTrack(mode) {
mapColours = Uint32Array.from(lapA.distance, (d, i) => {
if (mode === "speed") return ramp((lapA.speed[i] - 80) / 240, SPEED_STOPS);
// How fast the delta changes here: seconds gained or lost per metre, over 40 m
const rate = (interpolate(lapA.distance, delta, d + 20) - interpolate(lapA.distance, delta, d - 20)) / 40;
return ramp(0.5 + rate / 0.004, DELTA_STOPS);
});
map.sciChartSurface.invalidateElement();
}

// --- 6. Polar g-g diagram: each sample's g-force as a direction (angle) and size (radius) ---
const MAX_G = 5; // the plot's edge; Lap B's two kerb strikes (over 9 g for an instant) are clipped to it
const toPolar = (gLat, gLon) => {
const angle = (Math.atan2(gLon, gLat) * 180) / Math.PI;
return [(angle + 360) % 360, Math.min(Math.hypot(gLat, gLon), MAX_G)];
};
const gg = await SciChartPolarSurface.create(ui.ggDiv, { theme: new SciChartJsNavyTheme(), title: "g-g diagram (rings every 1 g)", titleStyle: { fontSize: 13 } });
gg.sciChartSurface.xAxes.add(
new PolarNumericAxis(gg.wasmContext, {
polarAxisMode: EPolarAxisMode.Angular,
visibleRange: new NumberRange(0, 360),
autoTicks: false,
majorDelta: 45,
drawLabels: false,
drawMinorGridLines: false,
drawMajorBands: false
})
);
gg.sciChartSurface.yAxes.add(
new PolarNumericAxis(gg.wasmContext, {
polarAxisMode: EPolarAxisMode.Radial,
axisAlignment: EAxisAlignment.Right,
visibleRange: new NumberRange(0, MAX_G),
autoTicks: false,
majorDelta: 1,
drawLabels: false, // rings every 1 g, out to 5 g
drawMinorGridLines: false,
drawMajorBands: false
})
);
// Direction labels: 90° (top) is accelerating, 270° (bottom) is braking, the sides are cornering
[
{ angle: 90, text: "Accel." },
{ angle: 270, text: "Braking" },
{ angle: 0, text: "Turn" },
{ angle: 180, text: "Turn" }
].forEach(({ angle, text }) =>
gg.sciChartSurface.annotations.add(
new NativeTextAnnotation({
x1: angle,
y1: MAX_G * 0.82,
text,
fontSize: 11,
textColor: "#C8D2E0",
horizontalAnchorPoint: EHorizontalAnchorPoint.Center,
verticalAnchorPoint: EVerticalAnchorPoint.Center
})
)
);
const ggMarkers = [lapA, lapB].map((lap, i) => {
const points = Array.from(lap.gLat, (gLat, k) => toPolar(gLat, lap.gLon[k]));
gg.sciChartSurface.renderableSeries.add(
new PolarXyScatterRenderableSeries(gg.wasmContext, {
dataSeries: new XyDataSeries(gg.wasmContext, { xValues: points.map((p) => p[0]), yValues: points.map((p) => p[1]) }),
pointMarker: new EllipsePointMarker(gg.wasmContext, { width: 3, height: 3, fill: LAPS[i].colour + "55", strokeThickness: 0 })
})
);
const marker = new XyDataSeries(gg.wasmContext, { xValues: [0], yValues: [0] });
gg.sciChartSurface.renderableSeries.add(
new PolarXyScatterRenderableSeries(gg.wasmContext, {
dataSeries: marker,
pointMarker: new EllipsePointMarker(gg.wasmContext, { width: 12, height: 12, fill: LAPS[i].colour, stroke: "#FFFFFF", strokeThickness: 2 })
})
);
return marker;
});

// --- 7. Polar speed gauge: Lap A on the outer arc, Lap B on the inner arc ---
const GAUGE_MAX = 350;
const sweep = (270 * Math.PI) / 180;
const gauge = await SciChartPolarSurface.create(ui.gaugeDiv, { theme: new SciChartJsNavyTheme() });
gauge.sciChartSurface.xAxes.add(
new PolarNumericAxis(gauge.wasmContext, {
polarAxisMode: EPolarAxisMode.Angular,
visibleRange: new NumberRange(0, GAUGE_MAX),
totalAngle: sweep,
startAngle: (Math.PI - sweep) / 2,
flippedCoordinates: true, // clockwise, with the gap at the bottom
autoTicks: false,
majorDelta: 50,
drawMajorGridLines: false,
drawMinorGridLines: false,
drawMajorBands: false,
labelStyle: { fontSize: 10 },
labelPrecision: 0
})
);
gauge.sciChartSurface.yAxes.add(
new PolarNumericAxis(gauge.wasmContext, { polarAxisMode: EPolarAxisMode.Radial, visibleRange: new NumberRange(0, 10), isVisible: false })
);
const speedArcs = [
{ inner: 8, outer: 9.6 },
{ inner: 6, outer: 7.6 }
].map((ring, i) => {
gauge.sciChartSurface.annotations.add(
new PolarArcAnnotation({ x1: 0, x2: GAUGE_MAX, y1: ring.outer, y2: ring.inner, fill: "#FFFFFF14", stroke: "#00000000", strokeThickness: 0 })
);
const arc = new PolarArcAnnotation({ x1: 0, x2: 0, y1: ring.outer, y2: ring.inner, fill: LAPS[i].colour, stroke: "#00000000", strokeThickness: 0 });
gauge.sciChartSurface.annotations.add(arc);
return arc;
});
const readout = new NativeTextAnnotation({
x1: 0,
y1: 0, // the centre of the gauge
text: "",
fontSize: 13,
lineSpacing: 3,
multiLineAlignment: EMultiLineAlignment.Center,
textColor: "#FFFFFF",
horizontalAnchorPoint: EHorizontalAnchorPoint.Center,
verticalAnchorPoint: EVerticalAnchorPoint.Center
});
gauge.sciChartSurface.annotations.add(readout);

// --- 8. Show one moment on the map and the polar charts: sample index iA of Lap A and iB of Lap B ---
const nearestIndex = (xs, x) => {
let lo = 0;
let hi = xs.length - 1;
while (hi - lo > 1) {
const mid = (lo + hi) >> 1;
if (xs[mid] <= x) lo = mid;
else hi = mid;
}
return x - xs[lo] < xs[hi] - x ? lo : hi;
};
function showMoment(iA, iB) {
[lapA, lapB].forEach((lap, i) => {
const k = i === 0 ? iA : iB;
carMarkers[i].updateXy(0, lap.x[k], lap.z[k]);
const [angle, radius] = toPolar(lap.gLat[k], lap.gLon[k]);
ggMarkers[i].updateXy(0, angle, radius);
speedArcs[i].x2 = lap.speed[k];
});
readout.text = `A ${lapA.speed[iA]} km/h\nB ${lapB.speed[iB]} km/h`;
}
// The cursor: both laps at the same distance
onCursor = (distance) => {
if (replay.running) return;
showMoment(nearestIndex(lapA.distance, distance), nearestIndex(lapB.distance, distance));
const d = Math.max(0, Math.min(TRACK_LENGTH, distance));
const gap = interpolate(lapA.distance, delta, d);
ui.status.textContent = `${Math.round(d)} m: Lap B is ${Math.abs(gap).toFixed(2)} s ${gap >= 0 ? "behind" : "ahead"}`;
};

// --- 9. Replay: both laps at the same elapsed time, in real time ---
const replay = { running: false, time: 0, last: 0 };
const timer = setInterval(() => {
if (!replay.running) return;
const now = performance.now();
replay.time += Math.min(now - replay.last, 250) / 1000;
replay.last = now;
const t = Math.min(replay.time, LAPS[1].lapTime);
const distances = [lapA, lapB].map((lap) => (t >= lap.time[lap.time.length - 1] ? TRACK_LENGTH : interpolate(lap.time, lap.distance, t)));
showMoment(nearestIndex(lapA.time, t), nearestIndex(lapB.time, t));
panes.forEach((pane) => pane.replayLines.forEach((line, i) => (line.x1 = distances[i])));
const metresBehind = distances[0] - distances[1];
ui.status.textContent =
t < LAPS[0].lapTime
? `${t.toFixed(1)} s: Lap B is ${Math.abs(Math.round(metresBehind))} m ${metresBehind >= 0 ? "behind" : "ahead"}`
: `Lap A finished in ${LAPS[0].lapTime.toFixed(3)} s; Lap B ${Math.round(metresBehind)} m to go`;
if (replay.time >= LAPS[1].lapTime) stopReplay(`Lap B finished ${(LAPS[1].lapTime - LAPS[0].lapTime).toFixed(3)} s behind`);
}, 16);
function stopReplay(message) {
replay.running = false;
ui.replayButton.textContent = "Replay both laps";
ui.status.textContent = message;
panes.forEach((pane) => pane.replayLines.forEach((line) => (line.isHidden = true)));
}
ui.replayButton.addEventListener("click", () => {
if (replay.running) return stopReplay("");
Object.assign(replay, { running: true, time: 0, last: performance.now() });
ui.replayButton.textContent = "Stop replay";
panes.forEach((pane) => pane.replayLines.forEach((line) => (line.isHidden = false)));
});

// --- 10. Controls: zoom to a corner, change the map colouring ---
ui.cornerSelect.addEventListener("change", () => {
const corner = CORNERS[Number(ui.cornerSelect.value)];
panes[0].xAxis.visibleRange = corner === undefined ? fullLap() : new NumberRange(corner - 300, corner + 300);
if (corner !== undefined) onCursor(corner);
});
ui.colourSelect.addEventListener("change", () => colourTrack(ui.colourSelect.value));

panes[0].sciChartSurface.addDeletable({
delete: () => {
clearInterval(timer);
resizeObserver.disconnect();
}
});
colourTrack(ui.colourSelect.value);
fitTrack();
onCursor(CORNERS[8]);

Key points:

  • Each lap trace pane is its own SciChartSurface with a FastLineRenderableSeries per lap. SciChartVerticalGroup gives every pane the same y-axis width so the distance axes line up, and a CursorModifier with a shared modifierGroup draws one crosshair across all of them.
  • The time delta is plain JavaScript: interpolate one lap's elapsed time at the other lap's distances and subtract. Any two laps work, whatever their sample rates.
  • A small CustomChartModifier2D turns the mouse position into a lap distance, which moves the markers on the track map and the polar charts. The track map is a line series with a palette provider that colours each point.
  • The g-g diagram is a SciChartPolarSurface with a PolarXyScatterRenderableSeries; the speed gauge uses PolarArcAnnotation arcs on a 270° angular axis.

See it in the demo app: JavaScript synchronised multi-chart · React synchronised multi-chart · Angular synchronised multi-chart. Related techniques: the React multi-chart dashboard, React polar gauge dashboard, React polar line chart and React real-time chart performance.

Go deeper: SciChart.js chart synchronisation documentation, the line chart, polar scatter, polar arc annotation, custom modifiers and palette provider pages, and the learning center guides to telemetry and time series data formats. For test and measurement work in industry, see SciChart for instrumentation and design, emulation and test.

Frequently asked questions​

What is racing telemetry?​

Racing telemetry is the data a race car or racing simulator records about every moment of a lap: speed, throttle and brake pedal positions, steering, gear, engine speed, g-forces and position on the track. Engineers and drivers chart it against lap distance to see exactly where, and why, one lap is faster than another.

How do you read racing telemetry?​

Overlay your lap on a faster reference lap, both plotted against lap distance. Start with the time-delta trace to find the corners where most time is lost, then read the speed, brake and throttle traces at those corners: where each lap starts braking, how much speed it carries through the slowest point, and how soon it gets back to full throttle.

What does delta mean in racing telemetry?​

Delta is the running time gap between two laps at the same point on the track: the time one lap took to reach that distance minus the time the reference lap took. Its value is the gap so far; its slope shows where the gap is changing. Where the line climbs, the lap is losing time to the reference; where it falls, it is gaining.

Why is racing telemetry plotted against distance instead of time?​

Because two laps are only comparable at the same place on the track. A slower lap reaches every corner later, so on a time axis its braking points drift further to the right of the faster lap's with every corner. Plotting against lap distance keeps each corner at the same x position for every lap.

How does sim racing telemetry work?​

Most racing simulators publish telemetry while the game runs, either as UDP network packets several dozen times a second or through shared memory, and many also write it to a file at the end of a session. A separate program on the same computer or network reads the data, decodes the channels, and charts and stores the laps, just as a data logger does on a real race car.

How do I make a lap comparison chart in JavaScript?​

Interpolate each lap's channels onto lap distance, compute the time delta at each distance, and draw one chart pane per channel with both laps as overlaid line series. With SciChart.js, use FastLineRenderableSeries for the traces, SciChartVerticalGroup to line the panes up, a CursorModifier with a shared modifierGroup for one crosshair across all panes, and synchronised x-axes for zooming. The scichart-react and scichart-angular packages wrap the same setup for React and Angular.

Sources​