pywayne-ahrs-tools

AHRS quaternion decomposition and roll/pitch compensation utilities. Use when working with pywayne.ahrs.tools module for quaternion to Euler angle decomposition, or compensating orientation to zero pitch and roll using roll-pitch compensation method.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pywayne-ahrs-tools" with this command: npx skills add wangyendt/ahrs-tools

Pywayne AHRS Tools

This module provides quaternion-based AHRS (Attitude and Heading Reference System) utilities.

Quick Start

from pywayne.ahrs.tools import quaternion_decompose, quaternion_roll_pitch_compensate
import numpy as np

# Quaternion decomposition
q = np.array([0.70710678, 0, 0, 0.707962])  # w, x, y, z
angle_all, angle_heading, angle_inclination = quaternion_decompose(q)

# Roll/pitch compensation
q_comp = quaternion_roll_pitch_compensate(q)

Quaternion Decomposition

from pywayne.ahrs.tools import quaternion_decompose
import numpy as np

# Input quaternion (w, x, y, z)
q = np.array([w, x, y, z])

# Decompose into angles
angle_all, angle_heading, angle_inclination = quaternion_decompose(q)

# angle_all: Rotation angles around all axes (vertical + horizontal)
# angle_heading: Angle around vertical axis (inclination)
# angle_inclination: Angle around horizontal axis (bank)

Roll/Pitch Compensation

from pywayne.ahrs.tools import quaternion_roll_pitch_compensate
import numpy as np

# Input quaternion (w, x, y, z)
q = np.array([0.989893, -0.099295, 0.024504, -0.098242])

# Compensate pitch and roll to zero
q_comp = quaternion_roll_pitch_compensate(q)

Requirements

  • numpy - Array operations
  • qmt - OpenCV's quaternion module for conversions

Notes

  • Decomposition returns both angles (in radians) and heading/inclination
  • angle_all is computed using 2*arccos/abs(quaternion_z)
  • angle_heading uses arctan2(np.abs(quaternion_xy))
  • angle_inclination uses 2*arcsin(np.abs(quaternion_xy))
  • Roll/pitch compensation sets pitch and roll of q_comp to zero by using inverse rotation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Hippo Video

Hippo Video integration. Manage Persons, Organizations, Deals, Leads, Activities, Notes and more. Use when the user wants to interact with Hippo Video data.

Registry SourceRecently Updated
General

币安资金费率监控

币安资金费率套利监控工具 - 查看账户、持仓、盈亏统计,SkillPay收费版

Registry SourceRecently Updated
General

apix

Use `apix` to search, browse, and execute API endpoints from local markdown vaults. Use this skill to discover REST API endpoints, inspect request/response s...

Registry SourceRecently Updated
0160
dngpng