npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mlg-converter

v0.9.0

Published

MLG log files converter

Downloads

39

Readme

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