Expand description

Quaternion library written in Rust.

This provides basic operations on Quaternion and interconversion with several attitude representations as generic functions (Supports f32 & f64).

Versor

Versor refers to a Quaternion representing a rotation, the norm of which is 1.

The documentation for this crate basically writes Versor instead of Unit Quaternion, but the difference in usage is not clear. Please think Versor = Unit Quaternion.

Enums

Represents 12 different rotations.

Specify the rotation type of Euler angles.

Traits

Provides a SIMD implementation with the std::arch module.

Functions

a + b

a + b

Calculate the conjugate of Quaternion.

a × b

a · b

a · b

Exponential function of Quaternion.

Exponential function of Pure Quaternion (Vector3).

Rotation of frame (Frame Rotation - Point Fixed)

Generate Versor by specifying rotation angle[rad] and axis vector.

Convert a DCM to a Versor representing the q v q* rotation (Point Rotation - Frame Fixed).

Convert Euler angles to Versor.

Convert Rotation vector to Versor.

a ∘ b

a ∘ b + c

a ∘ b + c

a ∘ b

Calcurate the inverse of Quaternion.

Calculate the inverse of Pure Quaternion (Vector3).

Lerp (Linear interpolation)

Natural logarithm of Quaternion.

Natural logarithm of Versor.

Product of DCM and Vector3

Hamilton product (Product of Quaternions).

Product of Pure Quaternions.

Invert the sign of a Quaternion.

Invert the sign of a Vector3.

Calculate L2 norm of Quaternion.

Calculate L2 norm of Vector3.

Normalization of Quaternion.

Normalization of Vector3.

Rotation of point (Point Rotation - Frame Fixed)

Power function of Quaternion.

Power function of Versor.

Calculate a Versor to rotate from vector a to b.

Calculate a Versor to rotate from vector a to b.

s * q

s*a + b

s * v

Slerp (Spherical linear interpolation)

a - b

a - b

Calculate the sum of each element of Quaternion.

Calculate the sum of each element of Vector3.

Calculate the rotation axis (unit vector) and the rotation angle[rad] around the axis from the Versor.

Convert a Versor to a DCM representing the q v q* rotation (Point Rotation - Frame Fixed).

Convert Versor to Euler angles.

Convert Versor to Rotation vector.

Type Definitions

Direction Cosine Matrix

Quaternion

Vector3 (Pure Quaternion)