pywayne-calibration-magnetometer-calibration

pywayne-calibration-magnetometer-calibration is a skill for Claude Code, Codex from wangyendt/wayne-skills. It costs 66 tokens per session (555 once invoked), scanned A, original, MIT.

A Python tool for correcting errors in magnetometer readings using data from an accelerometer, gyroscope, and magnetometer. A magnetometer measures magnetic direction, while calibration accounts for sensor distortion and constant offsets.

In plain words
What is it for?
Use it to process timestamped IMU data and produce a 3-by-3 soft-iron correction matrix and a hard-iron offset vector for later magnetometer correction.
Why use it?
It turns raw sensor measurements into calibration values that can help correct readings affected by the device and its surrounding materials. The sensor data must include varied device orientations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to process timestamped IMU data and produce a 3-by-3 soft-iron correction matrix and a hard-iron offset vector for later magnetometer correction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wangyendt/wayne-skills/magnetometer-calibration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wangyendt/wayne-skills --skill magnetometer-calibration
Clone the repo
git clone --depth 1 https://github.com/wangyendt/wayne-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pywayne-calibration-magnetometer-calibration

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangyendt/wayne-skills/magnetometer-calibration/github.svg)](https://agentmods.dev/skills/wangyendt/wayne-skills/magnetometer-calibration)
Your own site
<a href="https://agentmods.dev/skills/wangyendt/wayne-skills/magnetometer-calibration"><img src="https://agentmods.dev/badge/skills/wangyendt/wayne-skills/magnetometer-calibration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pywayne-calibration-magnetometer-calibration

Your own site · 80×15
<a href="https://agentmods.dev/skills/wangyendt/wayne-skills/magnetometer-calibration"><img src="https://agentmods.dev/badge/skills/wangyendt/wayne-skills/magnetometer-calibration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00555
Opus 5 $0.00033 $0.00278
Sonnet 5 $0.00013 $0.00111
Haiku 4.5 $0.00007 $0.00056

Measured 9d ago against content hash 4141a43a6525, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pywayne-calibration-magnetometer-calibration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pywayne/calibration/magnetometer-calibration/SKILL.md · 69 lines

What it actually says

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) and qmt (quaternion math) modules
  • Method: Currently only supports close_form method
  • Orientation: Uses VQF for sensor fusion and orientation estimation during calibration
  • Performance: process() uses VQF/qmt batch operations and solves the final accumulated calibration matrix once
  • Output: Prints calibration parameters during processing
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 69 lines · 66 tokens per session scan A 4141a43a6525

Subscribe to this mod's changes

pywayne-calibration-magnetometer-calibration is a skill published in the GitHub repository wangyendt/wayne-skills (8 stars, last pushed 13d ago), licensed MIT. It adds 66 tokens to every session and 555 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cardputer-buddy

Iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after the device is already provisioned via m5-onboard. Use when the user wants to add a new app, push a single changed .py without re-flashing, watch device serial logs, or run a one-shot REPL command. Trigger on "add an app", "push to…

anthropics/claude-plugins-official · 109 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens

HA Integration Dev

Home Assistant custom integration development in Python. Covers customcomponents, DataUpdateCoordinator, configflow, OAuth2, conversation agent, HACS publishing, device registry, entity platforms, services, repair issues, diagnostics, Bluetooth integrations, and multi-coordinator patterns.

tonylofgren/aurora-smart-home · 55 tokens

triton-ascend

A guide to writing Triton kernels for Ascend NPUs. Triton is a Python-based language for describing parallel operations that run in blocks across the device.

mindspore-ai/akg · 28 tokens

triton-ascend-case-index-put

An optimization pattern for indexed assignment, which writes values into positions chosen by index arrays. It loads index data into fast on-chip memory so a loop can reuse it.

mindspore-ai/akg · 73 tokens

xpu-port

Execute a single-target CUDA-to-XPU port of a PyTorch repo with libcst-based scan, mechanical rewrite, and CPU FP64 vs target-dtype correctness verify on one forward pass. Use when the request says "port" — "port my repo to XPU", "port my repo at to XPU", "rewrite the CUDA calls to XPU", "apply the mechanical…

intel/gpu-ai-skills · 193 tokens