Suite of library and tools for magnetometer calibration.
See the following usage guides:
The core functionality of this suite revolves around fitting calibration coefficients. The currently supported fit functions are:
| Function | Correction | Coefficients calibrated |
|---|---|---|
| Spherical fit | - Hard-iron offset - Uniform scale factor |
|
| Ellipsoidal fit | - Hard-iron offset - Non-uniform scale factor - Symmetric (non-uniform) cross-axis coupling |
where,
The following coefficients are used to provide corrections to the device:
where,
where,
In general, Spherical Fit is more reliable but less accurate. Ellipsoidal Fit is much more accurate, but requires high spatial coverage (> 60%).
A good rule of thumb is to start with Spherical Fit for a baseline. Then, an Ellipsoidal Fit can be run to see if it improves calibration over the baseline.
See the Releases page for downloads.
Releases are currently distributed as a compressed folder containing the pre-built binaries.
Each component is distributed separately. Download the folder for the desired component and version and unzip it.
This project uses CMake. To configure it, first create a build directory in the project root:
mkdir <build-dir>
Then, run the configure command:
cmake -S . -B <build-dir>
Once the project has been configured, build it:
cmake --build <build-dir> --parallel
After building, run this if you would like to create a distributable package as well:
cmake --build <build_dir> --target package_microstrain_mag_cal
The package will be in <build-dir>.
The library and application are developed together under the same project. They should be treated as one during development.
Unit tests should be run after every code change to catch errors early:
ctest --test-dir <build-dir> -L unit --output-on-failure --parallel