MVL Sim: replay a FIT file through your data field’s own code, with map and timeline (open source)

I’ve been building data fields for my Edge, and kept running into the same wish that comes up here now and then: test a field against a real ride, at any moment of it, without riding again. The simulator’s FIT playback helps, but it doesn’t give the field everything a ride does, and there’s no way to jump around in it.

So I wrote a small tool for it, and it’s now open source (MIT):
https://github.com/remonen-devlabs/mvl-sim

What it does

  • Replays a recorded .fit activity through your data field’s own Monkey C code, in the browser: the device screen, the ride on a map, and a timeline you can drag.
  • Jumping to any moment replays the ride from the start (a 3-hour ride takes about 0.1 s), so averages, smoothing and counters in your code are exact wherever you land.
  • Edit a .mc file, press Reload apps, and the same moment of the same ride is back on screen a second later.
  • Put your field next to the device’s own fields (speed, HR, 3 s power …) or other Connect IQ fields, in the device’s real screen layouts.
  • Reads power, HR, cadence, speed, altitude, GPS, laps and pauses, gear changes, radar, FTP/zones and battery level from the file. Shows the FIT developer fields your app writes and its System.println output.
  • Compile check runs the real monkeyc -l 3.

What it doesn’t do

  • Memory limits and real device timing. Garmin’s simulator and the device stay the final test.
  • Garmin’s .cft fonts: devices that use them (e.g. Edge 530/830) get measured stand-in fonts, with sizes close to the device but different glyph shapes.
  • Watch faces, widgets and device apps. Data fields only for now.

What you need: Node.js 18+ and your own Connect IQ SDK with the devices you want (from the SDK Manager). Nothing is installed, and no npm packages. It runs locally on 127.0.0.1, and your FIT files never leave your computer. It ships with a made-up sample ride and an example field, so you can try it in a minute. Checked against Garmin’s simulator on SDK 9.3.0 (font metrics, number formatting, a language test), and run on Windows and Linux, with CI on macOS.

It’s a spare-time tool. No monetization, no nothing. Bug reports that come with a small project and FIT file are very welcome as GitHub issues. I promise to look at them and if seen fit I will implement them. But no promises, even retired ex-programmer has only 24 hours in a day and a man must ride a bike every now and then also.

.