PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <AxisAngle.hpp>
Public Types | |
typedef Matrix< Type, 3, 1 > | Matrix31 |
Public Types inherited from matrix::Vector< Type, 3 > | |
typedef Matrix< Type, M, 1 > | MatrixM1 |
Public Member Functions | |
AxisAngle (const Type data_[3]) | |
Constructor from array. More... | |
AxisAngle ()=default | |
Standard constructor. More... | |
AxisAngle (const Matrix31 &other) | |
Constructor from Matrix31. More... | |
AxisAngle (const Quaternion< Type > &q) | |
Constructor from quaternion. More... | |
AxisAngle (const Dcm< Type > &dcm) | |
Constructor from dcm. More... | |
AxisAngle (const Euler< Type > &euler) | |
Constructor from euler angles. More... | |
AxisAngle (Type x, Type y, Type z) | |
Constructor from 3 axis angle values (unit vector * angle) More... | |
AxisAngle (const Matrix31 &axis_, Type angle_) | |
Constructor from axis and angle. More... | |
Vector< Type, 3 > | axis () |
Type | angle () |
Public Member Functions inherited from matrix::Vector< Type, 3 > | |
Vector ()=default | |
Vector (const MatrixM1 &other) | |
Vector (const Type data_[M]) | |
Vector (const Slice< Type, M, 1, P, Q > &slice_in) | |
Type | operator() (size_t i) const |
Type & | operator() (size_t i) |
Type | dot (const MatrixM1 &b) const |
Type | operator* (const MatrixM1 &b) const |
Vector | operator* (Type b) const |
Type | norm () const |
Type | norm_squared () const |
Type | length () const |
void | normalize () |
Vector | unit () const |
Vector | unit_or_zero (const Type eps=Type(1e-5)) const |
Vector | normalized () const |
bool | longerThan (Type testVal) const |
Vector | sqrt () const |
Public Member Functions inherited from matrix::Matrix< Type, M, 1 > | |
Matrix ()=default | |
Matrix (const Type data_[M *N]) | |
Matrix (const Type data_[M][N]) | |
Matrix (const Matrix &other) | |
Matrix (const Slice< Type, M, N, P, Q > &in_slice) | |
Type | operator() (size_t i, size_t j) const |
Accessors/ Assignment etc. More... | |
Type & | operator() (size_t i, size_t j) |
Matrix< Type, M, N > & | operator= (const Matrix< Type, M, N > &other) |
void | copyTo (Type dst[M *N]) const |
void | copyToColumnMajor (Type dst[M *N]) const |
Matrix< Type, M, P > | operator* (const Matrix< Type, N, P > &other) const |
Matrix Operations. More... | |
Matrix< Type, M, N > | operator* (Type scalar) const |
Scalar Operations. More... | |
Matrix< Type, M, N > | emult (const Matrix< Type, M, N > &other) const |
Matrix< Type, M, N > | edivide (const Matrix< Type, M, N > &other) const |
Matrix< Type, M, N > | operator+ (const Matrix< Type, M, N > &other) const |
Matrix< Type, M, N > | operator+ (Type scalar) const |
Matrix< Type, M, N > | operator- (const Matrix< Type, M, N > &other) const |
Matrix< Type, M, N > | operator- () const |
Matrix< Type, M, N > | operator- (Type scalar) const |
void | operator+= (const Matrix< Type, M, N > &other) |
void | operator+= (Type scalar) |
void | operator-= (const Matrix< Type, M, N > &other) |
void | operator-= (Type scalar) |
void | operator*= (const Matrix< Type, N, P > &other) |
void | operator*= (Type scalar) |
Matrix< Type, M, N > | operator/ (Type scalar) const |
void | operator/= (Type scalar) |
bool | operator== (const Matrix< Type, M, N > &other) const |
bool | operator!= (const Matrix< Type, M, N > &other) const |
void | write_string (char *buf, size_t n) const |
Misc. More... | |
void | print (FILE *stream=stdout) const |
Matrix< Type, N, M > | transpose () const |
Matrix< Type, N, M > | T () const |
const Slice< Type, P, Q, M, N > | slice (size_t x0, size_t y0) const |
Slice< Type, P, Q, M, N > | slice (size_t x0, size_t y0) |
const Slice< Type, 1, N, M, N > | row (size_t i) const |
Slice< Type, 1, N, M, N > | row (size_t i) |
const Slice< Type, M, 1, M, N > | col (size_t j) const |
Slice< Type, M, 1, M, N > | col (size_t j) |
void | setRow (size_t i, const Matrix< Type, N, 1 > &row_in) |
void | setCol (size_t j, const Matrix< Type, M, 1 > &column) |
void | setZero () |
void | zero () |
void | setAll (Type val) |
void | setOne () |
void | setNaN () |
void | setIdentity () |
void | identity () |
void | swapRows (size_t a, size_t b) |
void | swapCols (size_t a, size_t b) |
Matrix< Type, M, N > | abs () const |
Type | max () const |
Type | min () const |
bool | isAllNan () const |
AxisAngle class.
The rotation between two coordinate frames is described by this class.
Definition at line 21 of file AxisAngle.hpp.
typedef Matrix<Type, 3, 1> matrix::AxisAngle< Type >::Matrix31 |
Definition at line 33 of file AxisAngle.hpp.
|
inlineexplicit |
Constructor from array.
data_ | array |
Definition at line 40 of file AxisAngle.hpp.
References matrix::AxisAngle< Type >::AxisAngle().
|
default |
Standard constructor.
Referenced by matrix::AxisAngle< Type >::AxisAngle().
|
inline |
Constructor from Matrix31.
other | Matrix31 to copy |
Definition at line 55 of file AxisAngle.hpp.
|
inline |
Constructor from quaternion.
This sets the instance from a quaternion representing coordinate transformation from frame 2 to frame 1 where the rotation from frame 1 to frame 2 is described by a 3-2-1 intrinsic Tait-Bryan rotation sequence.
q | quaternion |
Definition at line 69 of file AxisAngle.hpp.
References matrix::acos(), f(), and matrix::sin().
|
inline |
Constructor from dcm.
Instance is initialized from a dcm representing coordinate transformation from frame 2 to frame 1.
dcm | dcm to set quaternion to |
Definition at line 93 of file AxisAngle.hpp.
|
inline |
Constructor from euler angles.
This sets the instance to a quaternion representing coordinate transformation from frame 2 to frame 1 where the rotation from frame 1 to frame 2 is described by a 3-2-1 intrinsic Tait-Bryan rotation sequence.
euler | euler angle instance |
Definition at line 108 of file AxisAngle.hpp.
|
inline |
Constructor from 3 axis angle values (unit vector * angle)
x | r_x*angle |
y | r_y*angle |
z | r_z*angle |
Definition at line 121 of file AxisAngle.hpp.
|
inline |
Constructor from axis and angle.
axis | An axis of rotation, normalized if not unit length |
angle | The amount to rotate |
Definition at line 135 of file AxisAngle.hpp.
References matrix::Vector< Type, M >::unit().
|
inline |
Definition at line 155 of file AxisAngle.hpp.
References matrix::Vector< Type, M >::norm().
Referenced by main().
|
inline |
Definition at line 147 of file AxisAngle.hpp.
References matrix::Vector< Type, M >::unit().
Referenced by main().