TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

Racing Data Converter

Converts time series data into popular motorsport Data Logger formats.

This library was developed at B'Energy Racing, a Formula SAE Electric Team from the Facens University Center.

Formats supported

Format Extension Software Support
Pro Tune .dlf Pro Tune Analyzer Writer
EFI Analytics ASCII .msl MegaLogViewer Writer
EFI Analytics Binary MLG (MLVLG) .mlg MegaLogViewer Writer
MoTeC CSV .csv MoTeC i2 Writer
Pi ASCII .txt Cosworth Pi Toolbox Writer
BOSCH Darab ASCII .txt Bosch WinDarab Writer
RacePak ASCII .txt RacePak DataLink II Writer
Excel CSV .csv Microsoft Excel Writer
CSV .csv, .tsv - Reader/Writer
B'Energy Meteor Log .met - Reader/Writer
JSON (raw data frames) .json - Reader/Writer

Command Line Interface

The CLI allows converting without writing a single line of code.

By default, it reads CSV files and outputs any format. The CSV file must have the first column as the timestamp in seconds. Columns can follow the format Name (unit) or Name (unit) [key].


You need NodeJS (16+ is recommended) installed first. Then, run the following command:

npm install -g racing-data-converter


Run racing-data-converter --help for a list of options.


racing-data-converter ./input.csv ./output.dlf --output-format protune

This command will convert an input CSV file named input.csv to a Pro Tune's log file named output.dlf.

Application Programming Interface

  1. Create an input stream. This can be a simple passthrough stream such as DataFrameStream or read from a CsvReader, MeteorReader or a JsonReader.
  2. Define the list of channels that you will work with, including information such as the unit of measure.
  3. Create a writer. This can be a CsvWriter, MeteorWriter, ExcelCsvWriter, MslWriter, MlgWriter, MotecCsvWriter, PiToolboxAsciiWriter, ProtuneWriter, RacePakWriter, WinDarabWriter or a JsonWriter.
  4. Create a writer stream from the writer class, receiving the input stream created earlier.
  5. The file is successfully converted!


npm install racing-data-converter


import { DataFrameStream, ProtuneWriter, SensorChannel } from 'racing-data-converter';
import * as fs from 'node:fs';

// Creates a plain data frame stream. This will be the input
const dataFrameStream = new DataFrameStream();

// Creates a Protune writer with two channels
const writer = new ProtuneWriter({
  channels: [
      key: SensorChannel.GPS_SPEED,
      name: 'Speed',
      unit: 'Km/h',
      key: 'happy-sensor',
      name: 'Happy Sensor',
      unit: 'm',
      decimalPlaces: 2,

// Creates a Protune stream using the data frame stream as the input
const protuneStream = writer.createStream(dataFrameStream);

// Pipes the Protune stream into the output file

// Writes a few data frames
  channel: SensorChannel.GPS_SPEED,
  value: 53,
  timestamp: 10,

  channel: 'happy-sensor',
  value: 3925,
  timestamp: 15,

  channel: SensorChannel.GPS_SPEED,
  value: 59,
  timestamp: 20,

// Finishes writing

There are more samples available.

Package Sidebar


npm i racing-data-converter

Weekly Downloads






Unpacked Size

200 kB

Total Files


Last publish


  • guichaguri