Expand description
Symbolic quaternion algebra for attitude representation. Symbolic quaternion algebra for attitude representation.
Quaternions are represented as q = w + x·i + y·j + z·k where w, x, y, z are symbolic expressions (Ex). This module provides:
- Hamilton product (
*), addition/subtraction, scalar multiplication - Conjugate, norm, inverse, normalisation, dot product
- Conversion to/from 3×3 rotation matrices (Shepperd’s method)
- Conversion to/from axis–angle and Euler angles
(
EulerConventionfrom the robotics module) - Rotation of vectors, spherical linear interpolation (slerp)
- Quaternion exponential, logarithm and powers
- Quaternion kinematics (
q̇ = ½ q ⊗ ω) and differentiation
§Conventions
- Rotations act on column vectors as
v' = q ⊗ (0, v) ⊗ q*, which matchesto_rotation_matrix(v' = R v) and the right-handedrot_x/rot_y/rot_zmatrices ofrobotics. - Methods documented as assuming a unit quaternion do not normalise
their input; call
normalizefirst when the norm is not provably one.
Structs§
- Quaternion
- A symbolic quaternion
q = w + x·i + y·j + z·k.
Enums§
- Euler
Convention - Euler angle convention for rotation composition.