Skip to content

feat(parsers): add TunerStudio MSL (.msl) log support - #87

Merged
SomethingNew71 merged 3 commits into
mainfrom
feature/msl-tunerstudio-parser
Aug 26, 2026
Merged

SomethingNew71 merged 3 commits into
mainfrom
feature/msl-tunerstudio-parser

Conversation

@SomethingNew71

Copy link
Copy Markdown
Collaborator

Closes #86.

Adds a parser for the tab-delimited legacy ASCII datalog TunerStudio writes as .msl. RealDash writes the same format when it logs a Speeduino over Bluetooth, which is the reporter's use case — cable-free logging with no conversion step.

Format

Header row, units row, then tab-delimited data:

Time	SecL	RPM	MAP	...	GPS Latitude	GPS Longitude	GPS Date	GPS Time
sec	s	RPM	kPa	...	lat	lon	date	time
0.0	202.0	965.0	33.0	...	-26.253315	-51.06884	18.8.2026	21:51

That header/units pair is what makes detection unambiguous. Several formats lead with a Time column; requiring a time unit (sec, s, ms, ...) underneath it is what keeps the parser off tab-delimited ECUMaster and generic Time-first exports. Detection runs after MegaSquirt (the comma-delimited TunerStudio CSV export) and before ECUMaster in dispatch_text_content.

Load-bearing behaviors

Documented in CLAUDE.md alongside the RaceChrono and Haltech contracts:

  • Time scale is read from the units row, never assumed — same class of bug as [Bug]: OBDLink CSV log time column wrong #80's RomRaider time-unit hardcode.
  • Blank and non-numeric fields carry the last known value forward, preserving column alignment. MSL columns are not all numeric: RealDash writes GPS Date as 18.8.2026 and leaves fields blank until the GPS gets a fix. Matches haltech.rs and ecumaster.rs.
  • Clock columns become seconds since midnight, so GPS Time plots as a channel instead of reading zero.
  • NaN / inf are treated as blank — both parse as f64 and would otherwise poison the min/max legend cache and collapse the chart's auto-bounds.
  • Times are forced monotonic across concatenated sessions, because computed-channel time-shift lookups binary-search times.
  • GPS Latitude / GPS Longitude keep their exported names, so find_gps_channels matches them and the Track Map works out of the box.

Verification

Both logs attached to #86 parse end to end through the real dispatch chain:

File Channels Rows Time range
datalog_2026-08-18_21-51-07.msl (3.6 MB) 29 16,903 0 – 674.114 s
datalog_2026-08-22_15-17-40.msl (10.0 MB) 29 46,288 0 – 1926.704 s

30 tests: 17 unit, 13 integration. Includes a regression test that walks every bundled example log and asserts the MSL detector claims none of them, plus assertions that no existing text parser claims an MSL log.

cargo test 387 + 269 + 55 + 36 + 13 passing, cargo fmt --all -- --check clean, cargo clippy --all-targets -- -D warnings clean.

Also in this PR

  • exampleLogs/msl/ — a 2000-row excerpt of the log attached to [Feature]: Support .msl logs from RealDash/TunerStudio #86, trimmed to keep the leading rows where the GPS has no fix yet
  • .msl added to the file-dialog extension filter
  • Version bump to 2.14.0: Cargo.toml, README shield, and ultralog.co (JSON-LD, hero badge, What's New card, ECU badge, SEO strings)

Adds a parser for the tab-delimited legacy ASCII datalog TunerStudio
writes as .msl, and that RealDash writes when logging a Speeduino over
Bluetooth. Closes #86.

The format is a header row, a units row, then tab-delimited data. That
header/units pair is what makes detection unambiguous — several other
formats also lead with a Time column, so requiring a time unit under it
keeps the parser from claiming tab-delimited ECUMaster or generic
Time-first exports. Detection runs after MegaSquirt and before ECUMaster
in the text dispatch chain.

Load-bearing behaviors, documented in CLAUDE.md:
- Time scale is read from the units row, never assumed
- Blank and non-numeric fields carry the last known value forward, which
  preserves column alignment for columns like RealDash's GPS Date
- Clock columns (HH:MM, HH:MM:SS) become seconds since midnight so
  GPS Time plots as a channel
- Times are forced monotonic across concatenated sessions
- GPS Latitude/Longitude keep their exported names so the Track Map
  matches them

Adds exampleLogs/msl/, a 2000-row excerpt of the log attached to #86,
trimmed to keep the leading rows where the GPS has no fix yet.
Review pass on the new MSL parser. "NaN", "inf" and "-inf" all parse
successfully as f64, so a logger writing one of those for a faulted
sensor would put a non-finite value into channel data — which poisons
the min/max legend cache and collapses the chart's auto-bounds. Those
fields now carry the last known value forward, the same as a blank.

Also relaxes the units-row check to accept an export that omits trailing
empty units; the time unit under the Time column is what discriminates
MSL from other tab-delimited Time-first formats, not the field count.

Adds a regression test that walks every bundled example log and asserts
the MSL detector claims none of them.
- Cargo.toml, README shield, JSON-LD softwareVersion, hero badge, and
  releaseNotes tag all move to 2.14.0
- What's New: TunerStudio MSL Imports card leads the grid
- Supported ECUs: adds the TunerStudio MSL badge as New, demotes
  RaceChrono to supported
- SEO: meta description, keywords, and JSON-LD description list MSL and
  RealDash logs
- Sitemap lastmod refreshed
Copilot AI lite review requested due to automatic review settings August 26, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@SomethingNew71
SomethingNew71 merged commit ef43025 into main Aug 26, 2026
4 checks passed
@SomethingNew71
SomethingNew71 deleted the feature/msl-tunerstudio-parser branch August 26, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support .msl logs from RealDash/TunerStudio

2 participants