Query AiM MP4, Cosworth PDS, MoTeC LD, Racelogic VBOX and .telemetry recordings directly in DuckDB, with stint-aware laps
Installing and Loading
INSTALL motorsport_telemetry FROM community;
LOAD motorsport_telemetry;
Example
SELECT name, unit, frequency_hz, sample_count
FROM telemetry_metadata('run.ld')
WHERE sample_count > 0;
SELECT *
FROM read_telemetry('run.ld',
rate := 100,
channels := 'Ground Speed,Throttle Pos,Brake Pedal Pos');
SELECT name, unit, frequency_hz, sample_count
FROM telemetry_metadata('run.mp4')
WHERE sample_count > 0;
SELECT *
FROM read_aim('run.mp4',
rate := 10,
channels := 'RPM,GPS Speed,GPS Latitude,GPS Longitude');
About motorsport_telemetry
motorsport_telemetry reads AiM aimd telemetry embedded in MP4, Pi
Research/Cosworth PDS, MoTeC i2 LD, Racelogic VBOX VBO, and
motorsport-telemetry-rs .telemetry recordings (zstd MTJ JSONL or the
legacy zip, detected by content) without an export step.
telemetry_laps returns each lap with a session-monotonic virtual lap
number, stint index, the dash's own stint lap counter, and a normalized
kind (flying, out, in, out-in, pit); telemetry_file_metadata reports
flying-lap and stint counts and picks the fastest flying lap. AiM MP4 support is native-only; the DuckDB-Wasm build does not
link the AiM parser, so .mp4 inputs and the read_aim/read_aimd
functions are unavailable in the browser. The native reader exposes scalar
CHS channels and expands each valid 56-byte GPS0 aggregate into 16 GPS
channels, including WGS84 position, speed, heading, accuracy, timing, and
status. It provides exact channel metadata, native-rate long-form samples,
and projected wide readers with time/channel pruning and type-aware
interpolation. Integer and event channels always use previous-value
semantics; only floating-point channels can interpolate linearly. The
parsers memory-map native files and table functions produce vectorized
DuckDB output.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| read_aim | table | NULL | NULL | |
| read_aimd | table | NULL | NULL | |
| read_cosworth | table | NULL | NULL | |
| read_motec | table | NULL | NULL | |
| read_telemetry | table | NULL | NULL | |
| read_telemetry_normalized | table | NULL | NULL | |
| read_telemetry_session | table | NULL | NULL | |
| read_vbo | table | NULL | NULL | |
| telemetry_can_convert | scalar | NULL | NULL | |
| telemetry_column_comments | table | NULL | NULL | |
| telemetry_convert | scalar | NULL | NULL | |
| telemetry_convert_column | scalar | NULL | NULL | |
| telemetry_file_metadata | table | NULL | NULL | |
| telemetry_laps | table | NULL | NULL | |
| telemetry_metadata | table | NULL | NULL | |
| telemetry_samples | table | NULL | NULL | |
| telemetry_session_metadata | table | NULL | NULL | |
| telemetry_units | table | NULL | NULL | |
| write_telemetry | table | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.