← 返回
效率工具 中文

Pywayne Calibration Magnetometer Calibration

Sensor calibration toolkit with magnetometer calibration using close-form method. Use when calibrating IMU sensors (accelerometer, gyroscope, magnetometer) t...
传感器校准工具包,包含使用闭式方法的磁力计校准。用于校准惯性测量单元(加速度计、陀螺仪、磁力计)等。
wangyendt
效率工具 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 725
下载
💾 11
安装
1
版本
#latest

概述

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:

ParameterShapeDescription
--------------------------------
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) and qmt (quaternion math) modules
  • Method: Currently only supports close_form method
  • Orientation: Uses VQF for sensor fusion and orientation estimation during calibration
  • Output: Prints calibration parameters during processing

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 09:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 147,812
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,347
content-creation

Pywayne Lark Bot

wangyendt
飞书/Lark 机器人 API 封装,提供完整的飞书机器人交互功能。适用于需要发送文本、图片、音频、文件、帖子、交互式、分享等各类消息的场景。
★ 0 📥 1,261