|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
31 #ifndef PPRZ_ALGEBRA_DOUBLE_H
32 #define PPRZ_ALGEBRA_DOUBLE_H
91 #define DOUBLE_VECT3_ROUND(_v) DOUBLE_VECT3_RINT(_v, _v)
94 #define DOUBLE_VECT3_RINT(_vout, _vin) { \
95 (_vout).x = rint((_vin).x); \
96 (_vout).y = rint((_vin).y); \
97 (_vout).z = rint((_vin).z); \
135 if (qnorm > FLT_MIN) {
136 q->
qi = q->
qi / qnorm;
137 q->
qx = q->
qx / qnorm;
138 q->
qy = q->
qy / qnorm;
139 q->
qz = q->
qz / qnorm;
196 #define DOUBLE_RMAT_OF_EULERS(_rm, _e) WARNING("DOUBLE_RMAT_OF_EULERS macro is deprecated, use the lower case function instead") double_rmat_of_eulers(&(_rm), &(_e))
197 #define DOUBLE_RMAT_OF_EULERS_321(_rm, _e) WARNING("DOUBLE_RMAT_OF_EULERS_321 macro is deprecated, use the lower case function instead") double_rmat_of_eulers(&(_rm), &(_e))
198 #define DOUBLE_QUAT_OF_EULERS(_q, _e) WARNING("DOUBLE_QUAT_OF_EULERS macro is deprecated, use the lower case function instead") double_quat_of_eulers(&(_q), &(_e))
199 #define DOUBLE_EULERS_OF_QUAT(_e, _q) WARNING("DOUBLE_EULERS_OF_QUAT macro is deprecated, use the lower case function instead") double_eulers_of_quat(&(_e), &(_q))
200 #define DOUBLE_QUAT_VMULT(v_out, q, v_in) WARNING("DOUBLE_QUAT_VMULT macro is deprecated, use the lower case function instead") double_quat_vmult(&(v_out), &(q), &(v_in))
static void double_rmat_of_eulers(struct DoubleRMat *rm, struct DoubleEulers *e)
void double_rmat_inv(struct DoubleRMat *m_b2a, struct DoubleRMat *m_a2b)
Inverse/transpose of a rotation matrix.
void double_quat_of_eulers(struct DoubleQuat *q, struct DoubleEulers *e)
static double double_vect3_norm(struct DoubleVect3 *v)
void double_eulers_of_quat(struct DoubleEulers *e, struct DoubleQuat *q)
Paparazzi floating point algebra.
#define FLOAT_MAT33_DIAG(_m, _d00, _d11, _d22)
static void double_quat_identity(struct DoubleQuat *q)
initialises a quaternion to identity
static void double_vect3_normalize(struct DoubleVect3 *v)
normalize 3D vector in place
void double_rmat_of_quat(struct DoubleRMat *rm, struct DoubleQuat *q)
void double_quat_vmult(struct DoubleVect3 *v_out, struct DoubleQuat *q, struct DoubleVect3 *v_in)
void double_rmat_of_eulers_321(struct DoubleRMat *rm, struct DoubleEulers *e)
Rotation matrix from 321 Euler angles (double).
void double_rmat_comp(struct DoubleRMat *m_a2c, struct DoubleRMat *m_a2b, struct DoubleRMat *m_b2c)
Composition (multiplication) of two rotation matrices.
void double_rmat_vmult(struct DoubleVect3 *vb, struct DoubleRMat *m_a2b, struct DoubleVect3 *va)
rotate 3D vector by rotation matrix.
static void double_quat_normalize(struct DoubleQuat *q)
Paparazzi generic algebra macros.
static double double_quat_norm(struct DoubleQuat *q)
static void double_rmat_identity(struct DoubleRMat *rm)
initialises a rotation matrix to identity
void double_rmat_transp_vmult(struct DoubleVect3 *vb, struct DoubleRMat *m_b2a, struct DoubleVect3 *va)
rotate 3D vector by transposed rotation matrix.