|
DUECA/DUSIME
|
A random collection of quaternion code. More...


Functions | |
| template<class T > | |
| double | dueca::Q2phi (const T &quat) |
| Extract the roll angle from a rotation quaternion. | |
| template<class T > | |
| double | dueca::Q2tht (const T &quat) |
| Extract the pitch angle from a rotation quaternion. | |
| template<class T > | |
| double | dueca::Q2psi (const T &quat) |
| Extract the yaw angle from a rotation quaternion. | |
| template<class T1 , class T2 > | |
| void | dueca::phithtpsi2Q (T1 &quat, const T2 phi, const T2 tht, const T2 psi) |
| Construct a quaternion from Euler-Rodriguez angles. | |
| template<class T , class U , class V > | |
| void | dueca::QxQ (T &result, const U &q1, const V &q2) |
| Multiply two quaternions. | |
| template<class T > | |
| void | dueca::Qconjugate (T &q) |
| Convert a quaternion to its conjugate. | |
| template<typename S , typename T > | |
| S & | dueca::printQ (S &s, const T &quat) |
| Print a quaternion to stream. | |
| template<typename S , typename T > | |
| S & | dueca::printPTP (S &s, const T &quat) |
| Print a quaternion to stream in its Euler angles form. | |
| template<typename M , typename T > | |
| void | dueca::Q2R (M &mat, const T &q) |
| Calculate the rotation matrix for a quaternion. | |
| template<class Mat , class Vec > | |
| void | dueca::cross_prod_matrix (Mat &m, const Vec &v) |
| Cross-product matrix set up from a vector. | |
A random collection of quaternion code.
|
inline |
Extract the roll angle from a rotation quaternion.
| T | vector type |
| quat | given quaternion |
|
inline |
Extract the pitch angle from a rotation quaternion.
| T | vector type |
| quat | given quaternion |
|
inline |
Extract the yaw angle from a rotation quaternion.
| T | vector type |
| quat | given quaternion |
|
inline |
Construct a quaternion from Euler-Rodriguez angles.
| T1 | Vector type for quaternion |
| T2 | Data type for angles |
| quat | Returned, quaternion vector |
| phi | Roll angle |
| tht | Pitch angle |
| psi | Yaw angle |
|
inline |
Multiply two quaternions.
| T | Vector type for result quaternion |
| U | Vector type for first |
| V | Vector type for second |
| result | Result quaternion |
| q1 | First input |
| q2 | Second input |
|
inline |
Convert a quaternion to its conjugate.
| T | Four-element vector/array type |
| q | Quaternion to change |
| S & dueca::printQ | ( | S & | s, |
| const T & | quat ) |
Print a quaternion to stream.
| S | Stream type |
| T | Four-element vector/array type |
| s | Stream object |
| quat | Quaternion |
| S & dueca::printPTP | ( | S & | s, |
| const T & | quat ) |
Print a quaternion to stream in its Euler angles form.
| S | Stream type |
| T | Four-element vector/array type |
| s | Stream object |
| quat | Quaternion |
|
inline |
Calculate the rotation matrix for a quaternion.
| M | Matrix format |
| T | Four-element vector/array type |
| mat | Matrix to be filled |
| q | Rotation quaternion |
|
inline |
Cross-product matrix set up from a vector.
| Mat | Matrix type |
| Vec | Quaternion vector type |
| m | Resulting matrix |
| v | Three-element vector |