Socket
Socket
Sign inDemoInstall

mlg-converter

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mlg-converter

MLG log files converter


Version published
Weekly downloads
4
decreased by-77.78%
Maintainers
1
Install size
24.8 kB
Created
Weekly downloads
 

Readme

Source

Binary MLG (MLVLG) log files converter

npm Maintainability Minimum Node.js Version License FOSSA Status

Simple tool for parsing and converting EFI Analytics (TunerStudio, MegaLogViewer) binary log files (.mlg) to a human readable formats like:

  • .csv - semicolon (;) separated (Virtual Dyno, spreadsheets, etc.)
  • .json - JSON raw data
  • .msl - ASCII format (TunerStudio, MegaLogViewer)

Or just can be used as a Node library producing JS plain object.

Caveats

  • MLVLG also carries data type called Markers (graphical marks used for indicating specific events). They will be stripped in .csv files.
  • minimum Node version: 14.x.
# single file, multiple formats
npx mlg-converter --format=csv,msl,json log1.mlg

# single format, multiple files
npx mlg-converter --format=msl log1.mlg log2.mlg log3.mlg

Using parser as a npm package

npm install --save mlg-converter
const fs = require('fs');
const { Parser } = require('mlg-converter');

const b = fs.readFileSync('./test/data/short.mlg');
const arrayBuffer = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
const result = new Parser(arrayBuffer)
  .parse((percent) => console.log(percent));

console.dir(result, { maxArrayLength: 1 }); // =>

{
  fileFormat: 'MLVLG',
  formatVersion: 1,
  timestamp: 2020-12-28T12:30:43.000Z,
  info: 'speeduino 202009-dev: Speeduino 2020.09-dev\n' +
    'Capture Date: Mon Dec 28 13:30:43 CET 2020',
  bitFieldNames: "",
  fields: [
    {
      name: 'Time',
      units: 's',
      displayStyle: 'Float',
      scale: 1,
      transform: 0,
      digits: 3
    },
    ... 68 more items
  ],
  records: [
    {
      type: 'field',
      timestamp: 15081,
      Time: 0,
      SecL: 8,
      RPM: 0,
      MAP: 10,
      MAPxRPM: 0,
      TPS: 0,
      AFR: 110,
      Lambda: 0.7482993006706238,
      IAT: 54,
      CLT: 68,
      Engine: 0,
      DFCO: 0,
      Gego: 100,
      Gair: 0,
      Gbattery: 100,
      Gwarm: 0,
      Gbaro: 0,
      Gammae: 0,
      'Accel Enrich': 0,
      'Current VE': 70,
      VE1: 70,
      VE2: 0,
      PW: 0,
      'AFR Target': 0,
      'Lambda Target': 0,
      PW2: 0,
      DutyCycle1: 0,
      DutyCycle2: 0,
      'TPS DOT': 0,
      Advance: 24,
      Dwell: 0,
      'Battery V': 71,
      'rpm/s': 0,
      'Boost PSI': -13.198457717895508,
      'Boost Target': 0,
      'Boost Duty': 0,
      'Boost cut': 0,
      'Hard Launch': 0,
      'Hard Limiter': 0,
      'Idle Control': 1,
      'IAC value': 34,
      'Idle Target RPM': 85,
      'Idle RPM Delta': 850,
      'Baro Pressure': 101,
      'Sync Loss #': 0,
      VSS_RAW: 0,
      Clutch_RAW: 1,
      Aux2: 0,
      Aux3: 0,
      Aux4: 0,
      Aux5: 0,
      Aux6: 0,
      Aux7: 0,
      Aux8: 0,
      Aux9: 0,
      Aux10: 0,
      Aux11: 0,
      Aux12: 0,
      Aux13: 0,
      Aux14: 0,
      Aux15: 0,
      'Advance 1': 24,
      'Advance 2': 0,
      'Trip Meter Miles': 0,
      'Odometer Miles': 11.340239524841309,
      'Vehicle Speed': 0,
      Power: 0,
      Torque: 0,
      Odometer_Miles: 11.340239524841309
    },
    ... 51 more items
  ]
}

Developing

npm install
npm run build
npm test

License

FOSSA Status

Keywords

FAQs

Last updated on 13 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc