pywayne-calibration-magnetometer-calibration

Calibrate magnetometer data to estimate soft-iron matrix and hard-iron offset.

8|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/wangyendt/wayne-skills --skill pywayne-calibration-magnetometer-calibration
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pywayne-calibration-magnetometer-calibration
Source: https://github.com/wangyendt/wayne-skills/tree/main/pywayne/calibration/magnetometer-calibration
Command: npx skills add https://github.com/wangyendt/wayne-skills --skill pywayne-calibration-magnetometer-calibration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Calibrates magnetometer data to estimate soft-iron matrix and hard-iron offset for magnetometer correction, enabling accurate orientation estimates in IMU sensors.

Core Features & Use Cases

  • Close-form magnetometer calibration method.
  • Computes soft-iron matrix and hard-iron offset for magnetometer correction.
  • Integrates with VQF sensor fusion for orientation estimation.
  • Use cases include robotics, drones, and mobile devices requiring robust magnetometer calibration.

Quick Start

Collect diverse orientation data from accelerometer, gyroscope, and magnetometer and run MagnetometerCalibrator to compute the soft-iron matrix and hard-iron offset.

Frequently Asked Questions about pywayne-calibration-magnetometer-calibration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calibrate a magnetometer for IMU sensor fusion?▼

Magnetometer calibration estimates soft-iron and hard-iron distortions from IMU measurements to correct sensor data for accurate orientation estimation. You collect diverse orientation data and compute the correction matrix and offset.

What is soft-iron and hard-iron calibration for magnetometers?▼

Soft-iron and hard-iron calibration corrects magnetic distortions in IMU sensors by estimating a 3x3 soft-iron matrix and a 3-element hard-iron offset, ensuring stable orientation tracking in robotics and drones.

What data do I need to collect for magnetometer calibration?▼

Magnetometer calibration requires sensor data arrays including timestamps, accelerometer, gyroscope, and magnetometer readings. You must collect data across varied orientations to accurately estimate the correction parameters.

Can I use this magnetometer calibration method with VQF sensor fusion?▼

Yes, the magnetometer calibration integrates with VQF sensor fusion for orientation estimation. It computes the soft-iron matrix and hard-iron offset needed to correct magnetometer inputs for the fusion algorithm.

Does close-form magnetometer calibration work for drones and handheld devices?▼

Close-form magnetometer calibration is applicable to IMU sensor suites in drones, robotics, and handheld devices. It computes the necessary soft-iron and hard-iron corrections for stable orientation across these platforms.

Why are my IMU orientation estimates inaccurate without magnetometer calibration?▼

Uncalibrated magnetometer data contains soft-iron and hard-iron distortions that corrupt orientation estimates. Calibration computes the correction matrix and offset needed to remove these magnetic disturbances from the sensor data.