![]() |
Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
|
maintain attitude and provide coordinate transformation services More...
#include <quaternion.h>


Public Member Functions | |
| quaternion (vector< datatype, 3 > &init) | |
| constructor from euler angle | |
| quaternion () | |
| constructor from datatype[4] | |
| void | normalize (void) |
| normalize quaternion absolute value to ONE | |
| operator eulerangle< datatype > () const | |
| quaternion -> euler angle transformation | |
| datatype | get_north (void) const |
| get north component of attitude | |
| datatype | get_east (void) const |
| get east component of attitude | |
| datatype | get_down (void) const |
| get down component of attitude | |
| datatype | get_heading (void) const |
| get heading component of attitude | |
| void | rotate (datatype p, datatype q, datatype r) |
| quaternion update using rotation vector | |
| void | from_euler (datatype p, datatype q, datatype r) |
| euler angle -> quaternion transformation | |
| void | get_rotation_matrix (matrix< datatype, 3 > &m) const |
| quaternion -> rotation matrix transformation | |
| quaternion< datatype > | operator* (quaternion< datatype > &right) |
| void | from_rotation_matrix (matrix< datatype, 3 > &rotm) |
Public Member Functions inherited from vector< datatype, 4 > | |
| vector (void) | |
| vector (const datatype *data) | |
| constructor from datatype [] | |
| vector (const vector &right) | |
| copy constructor | |
| datatype | scalar_multiply (const vector &right) const |
| < scalar product | |
| datatype | operator* (const vector &right) const |
| < scalar (dot) product -> scalar | |
| vector | operator* (const datatype &right) const |
| < multiply vector by scalar | |
| vector | vector_multiply (const vector &right) const |
| < vector cross product -> vector | |
| datatype | abs (void) const |
| vector abs operator returns absolute value | |
| vector & | operator= (const vector &right) |
| vector copy operator - size checked through template | |
| void | zero (void) |
| set all elements to zero | |
| vector & | negate (void) |
| vector & | operator+= (const vector &right) |
| operator += | |
| vector & | operator-= (const vector &right) |
| operator -= | |
| vector | operator+ (const vector &right) const |
| operator + | |
| vector | operator- (const vector &right) const |
| operator - (vector - vector returns vector) | |
| vector & | operator*= (const datatype &right) |
| datatype & | operator[] (const int index) |
| const datatype | operator[] (int index) const |
| void | normalize (void) |
| vector normalization | |
maintain attitude and provide coordinate transformation services
Definition at line 35 of file quaternion.h.
|
inline |
constructor from euler angle
Definition at line 39 of file quaternion.h.
References quaternion< datatype >::from_euler().
|
inline |
constructor from datatype[4]
Definition at line 45 of file quaternion.h.
euler angle -> quaternion transformation
Definition at line 139 of file quaternion.h.
References COS, HALF, SIN, and vector< datatype, 4 >::vector().
Referenced by quaternion< datatype >::quaternion(), and AHRS_type::set_from_euler().
|
inline |
formula from roenbaeck p35
| rotm | rotation matrix -> quaternion transformation |
Definition at line 194 of file quaternion.h.
References HALF, quaternion< datatype >::normalize(), ONE, QUARTER, SQRT, and vector< datatype, 4 >::vector().
Referenced by AHRS_type::attitude_setup().
get down component of attitude
Definition at line 101 of file quaternion.h.
References TWO, and vector< datatype, 4 >::vector().
Referenced by AHRS_type::get_down().
get east component of attitude
Definition at line 91 of file quaternion.h.
References TWO, and vector< datatype, 4 >::vector().
Referenced by AHRS_type::get_east().
get heading component of attitude
Definition at line 111 of file quaternion.h.
get north component of attitude
Definition at line 81 of file quaternion.h.
References vector< datatype, 4 >::vector().
Referenced by AHRS_type::get_north().
|
inline |
quaternion -> rotation matrix transformation
Definition at line 156 of file quaternion.h.
References ONE, TWO, and vector< datatype, 4 >::vector().
Referenced by AHRS_type::attitude_setup(), and AHRS_type::set_from_euler().
normalize quaternion absolute value to ONE
Definition at line 52 of file quaternion.h.
References ONE, SQRT, and vector< datatype, 4 >::vector().
Referenced by quaternion< datatype >::from_rotation_matrix(), and quaternion< datatype >::rotate().
|
inline |
quaternion -> euler angle transformation
formula from roenbaeck p34
Definition at line 65 of file quaternion.h.
References ASIN, ATAN2, TWO, and vector< datatype, 4 >::vector().
|
inline |
| right | quaternion multiplication |
Definition at line 176 of file quaternion.h.
References vector< datatype, size >::vector(), and vector< datatype, 4 >::vector().
quaternion update using rotation vector
Definition at line 122 of file quaternion.h.
References quaternion< datatype >::normalize().