/install magnetometer-calibration
Pywayne Calibration
pywayne.calibration.MagnetometerCalibrator provides magnetometer calibration using sensor data (accelerometer, gyroscope, magnetometer).
Quick Start
from pywayne.calibration import MagnetometerCalibrator
import numpy as np
# Sensor data: ts (N,), acc (N,3), gyro (N,3), mag (N,3)
calibrator = MagnetometerCalibrator(method='close_form')
Sm, h = calibrator.process(ts, acc, gyro, mag)
# Sm: Soft-iron matrix (3x3)
# h: Hard-iron offset vector (3,)
Input Data Format
Sensor data must be numpy arrays with matching sample counts:
ts # (N,) - Timestamps (seconds)
acc # (N, 3) - Accelerometer [ax, ay, az]
gyro # (N, 3) - Gyroscope [gx, gy, gz]
mag # (N, 3) - Magnetometer [mx, my, mz]
Data requirements:
- Sensor data should cover various orientations for effective calibration
- Minimum data points required (exact number depends on calibration stability)
- Arrays must be C-contiguous (auto-converted internally)
Calibration Parameters
process() returns:
| Parameter | Shape | Description |
|---|---|---|
Sm |
(3, 3) | Soft-iron matrix |
h |
(3,) | Hard-iron offset vector |
Usage in Application
Apply calibration to raw magnetometer readings:
# Calibrated reading
m_calibrated = Sm @ (m_raw - h)
Temporal Calibration
Temporal calibration module exists but is reserved for future expansion. Currently no functionality is implemented.
Important Notes
- Dependencies: Requires
vqf(VQF quaternion filter) andqmt(quaternion math) modules - Method: Currently only supports
close_formmethod - Orientation: Uses VQF for sensor fusion and orientation estimation during calibration
- Output: Prints calibration parameters during processing
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install magnetometer-calibration - After installation, invoke the skill by name or use
/magnetometer-calibration - Provide required inputs per the skill's parameter spec and get structured output
What is Pywayne Calibration Magnetometer Calibration?
Sensor calibration toolkit with magnetometer calibration using close-form method. Use when calibrating IMU sensors (accelerometer, gyroscope, magnetometer) t... It is an AI Agent Skill for Claude Code / OpenClaw, with 511 downloads so far.
How do I install Pywayne Calibration Magnetometer Calibration?
Run "/install magnetometer-calibration" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Pywayne Calibration Magnetometer Calibration free?
Yes, Pywayne Calibration Magnetometer Calibration is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Pywayne Calibration Magnetometer Calibration support?
Pywayne Calibration Magnetometer Calibration is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Pywayne Calibration Magnetometer Calibration?
It is built and maintained by wangyendt (@wangyendt); the current version is v0.1.0.