Skip to the content.

This simulator processes real calibration measurement data from your Maslow CNC machine to compute optimal anchor point positions. Unlike the machine simulator (index.html) which generates synthetic data, this tool works with actual measurements collected from your machine.

Purpose

This tool is designed for:

Quick Start

  1. Open data-parser.html in your web browser
  2. Copy calibration measurement data from your machine
  3. Paste it into the data input field
  4. Click “Parse and Validate”
  5. Adjust initial anchor position guesses if needed
  6. Click “Compute Anchor Positions”
  7. Review the optimized positions and fitness score

Data Format

The tool accepts measurement data in multiple formats:

Format 1: Plain comma-separated objects

{tl:2051.76, tr:2053.05, bl:1942.31, br:1952.85},{tl:2154.52, tr:1955.15, bl:2132.14, br:1584.18}

Format 2: Array notation

[{tl:2051.76, tr:2053.05, bl:1942.31, br:1952.85},{tl:2154.52, tr:1955.15, bl:2132.14, br:1584.18}]

Format 3: CLBM format (from machine output)

CLBM:[{bl:2960.58, br:3150.08, tr:3067.72, tl:3049.85},{bl:3066.96, br:3042.59, tr:2957.53, tl:3158.38},]

Each measurement object contains:

The parser automatically handles:

How to Get Measurement Data

Measurement data comes from the calibration process on your Maslow machine. The data is typically logged during calibration and can be found in:

Using the Tool

1. Paste Measurement Data

Copy your calibration measurements and paste them into the large text area. The format should be comma-separated measurement objects as shown above.

2. Parse and Validate

Click “Parse and Validate” to check that your data is correctly formatted. The tool will:

3. Set Initial Anchor Positions

Provide starting estimates for where the anchor points are located:

These don’t need to be perfect - the algorithm will refine them. However, better initial guesses lead to faster convergence.

4. Compute

Click “Compute Anchor Positions” to run the optimization algorithm. The tool will:

5. Interpret Results

The results show:

Measurement Map & Error Breakdown

When a computation finishes (especially when a fitness gate fails), a Measurement Map is shown:

The map is interactive: scroll to zoom, drag to pan, and click a dot (or use the table checkboxes) to exclude a suspect measurement — the anchors are re-solved from the remaining points instantly, so you can see how much a bad point was skewing the fit. Use Exclude failing points to drop everything that breaks a gate at once, Include all points to restore them, and Reset view to recentre the map.

Code Sharing

This tool uses the exact same Levenberg-Marquardt math that runs on the machine. The function recomputeAnchorsLM() in the shared library calibration-computation.js is a line-for-line port of the firmware routine Calibration::recomputeAnchorsWithLevenbergMarquardt() (firmware/FluidNC/src/Maslow/Calibration.cpp). Given the same CLBM measurements and the same initial anchor guess, the parser produces the same anchor positions the machine computes.

Maintainer note: calibration-computation.js in this folder is now the only copy of this math in JavaScript, and it exists for development and simulation only. It used to be mirrored at ESP3D-WEBUI/www/js/calibration-computation.js and shipped inside index.html.gz, but the web UI stopped calling it once calibration moved into the firmware, so that copy was deleted to shrink the bundle. The authority for how calibration actually behaves is Calibration::recomputeAnchorsWithLevenbergMarquardt() in firmware/FluidNC/src/Maslow/Calibration.cppif you change the firmware routine, update this file to match, or the parser will quietly disagree with the machine.

The port reproduces the firmware exactly, including:

Important: Paste the machine’s logged CLBM:[...] data directly. Those values are already projected into the XY plane by the firmware, so the parser feeds them straight into the solver without any additional Z projection — matching exactly what the machine’s solver sees.

Differences from Machine Simulator

Feature Data Parser Machine Simulator
Data Source Real measurements from machine Simulated measurements
Purpose Analyze actual calibration data Test algorithm with synthetic data
Use Case Troubleshooting, data analysis Algorithm development, testing
Input Paste measurement data Configure simulation parameters

Example Workflow

  1. Collect Data: Run calibration on your machine and save the measurement output
  2. Parse: Paste the data into this tool and validate it
  3. Compute: Process the measurements to find optimal anchor positions
  4. Compare: Compare results with what your machine computed
  5. Troubleshoot: If results differ, investigate data quality or initial guesses

Tips

Technical Details

The computation is a Levenberg-Marquardt sparse bundle adjustment, ported verbatim from the firmware (Calibration::recomputeAnchorsWithLevenbergMarquardt):

  1. Estimate each waypoint’s sled (x, y) from all four belt lengths via 2D Gauss-Newton
  2. Jointly optimize anchor params [tlX, tlY, trX, trY, brX] and every sled position, minimizing the sum of squared belt-length residuals
  3. Solve each LM step with a Schur complement (5×5 anchor system + 2×2 sled blocks) using analytic Jacobians and adaptive damping λ
  4. Retry up to 10 times from the firmware’s fixed perturbation table, keeping the best result

The algorithm uses the firmware constants:

Support

For issues or questions: