|
C Attitude Math Library
Quaternion, Euler, and DCM math utilities for attitude control.
|
Go to the source code of this file.
Data Structures | |
| struct | EulerAngles |
| Storage for Euler angles with an associated rotation order. More... | |
Enumerations | |
| enum | EulerOrder { EULER_ZYX , EULER_ZYZ , EULER_XYZ } |
| Enumeration of supported Euler rotation orders. More... | |
Functions | |
| void | euler_to_dcm (const EulerAngles *e, double dcm[3][3]) |
| Convert Euler angles to a direction cosine matrix. | |
| int | euler_to_dcm_checked (const EulerAngles *e, double dcm[3][3]) |
| Checked Euler-to-DCM conversion. | |
| void | euler_to_quaternion (const EulerAngles *e, double q[4]) |
| Convert Euler angles to a quaternion. | |
| int | euler_to_quaternion_checked (const EulerAngles *e, double q[4]) |
| Checked Euler-to-quaternion conversion. | |
| enum EulerOrder |
Enumeration of supported Euler rotation orders.
The library currently implements intrinsic ZYX rotations. The other values are reserved so callers can reject unsupported inputs through the checked API.
| Enumerator | |
|---|---|
| EULER_ZYX | Standard aerospace yaw → pitch → roll sequence. |
| EULER_ZYZ | Useful for certain satellite pointing laws and robotics arms. |
| EULER_XYZ | Roll → pitch → yaw intrinsic sequence. |
Definition at line 14 of file euler.h.
| void euler_to_dcm | ( | const EulerAngles * | e, |
| double | dcm[3][3] | ||
| ) |
Convert Euler angles to a direction cosine matrix.
| e | Euler angle container in radians. |
| dcm | Output \(3\times3\) matrix (row-major). |
Definition at line 41 of file euler.c.
| int euler_to_dcm_checked | ( | const EulerAngles * | e, |
| double | dcm[3][3] | ||
| ) |
Checked Euler-to-DCM conversion.
Definition at line 16 of file euler.c.
| void euler_to_quaternion | ( | const EulerAngles * | e, |
| double | q[4] | ||
| ) |
Convert Euler angles to a quaternion.
| e | Euler angle container in radians. |
| q | Output quaternion in \([w, x, y, z]\) order. |
Definition at line 67 of file euler.c.
| int euler_to_quaternion_checked | ( | const EulerAngles * | e, |
| double | q[4] | ||
| ) |
Checked Euler-to-quaternion conversion.
Definition at line 47 of file euler.c.