![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Paparazzi floating point algebra. More...
Go to the source code of this file.
Data Structures | |
struct | FloatVect2 |
struct | FloatVect3 |
struct | FloatQuat |
Roation quaternion. More... | |
struct | FloatMat33 |
struct | FloatRMat |
rotation matrix More... | |
struct | FloatEulers |
euler angles More... | |
struct | FloatRates |
angular rates More... | |
Functions | |
static float | float_log_n (float v, float n) |
static float | float_vect2_norm2 (struct FloatVect2 *v) |
static float | float_vect2_norm (struct FloatVect2 *v) |
static void | float_vect2_normalize (struct FloatVect2 *v) |
normalize 2D vector in place | |
static float | float_vect3_norm2 (struct FloatVect3 *v) |
static float | float_vect3_norm (struct FloatVect3 *v) |
static void | float_vect3_normalize (struct FloatVect3 *v) |
normalize 3D vector in place | |
void | float_vect3_integrate_fi (struct FloatVect3 *vec, struct FloatVect3 *dv, float dt) |
in place first order integration of a 3D-vector | |
void | float_rates_integrate_fi (struct FloatRates *r, struct FloatRates *dr, float dt) |
in place first order integration of angular rates | |
void | float_rates_of_euler_dot (struct FloatRates *r, struct FloatEulers *e, struct FloatEulers *edot) |
static void | float_rmat_identity (struct FloatRMat *rm) |
initialises a rotation matrix to identity | |
void | float_rmat_inv (struct FloatRMat *m_b2a, struct FloatRMat *m_a2b) |
Inverse/transpose of a rotation matrix. | |
void | float_rmat_comp (struct FloatRMat *m_a2c, struct FloatRMat *m_a2b, struct FloatRMat *m_b2c) |
Composition (multiplication) of two rotation matrices. | |
void | float_rmat_comp_inv (struct FloatRMat *m_a2b, struct FloatRMat *m_a2c, struct FloatRMat *m_b2c) |
Composition (multiplication) of two rotation matrices. | |
float | float_rmat_norm (struct FloatRMat *rm) |
Norm of a rotation matrix. | |
void | float_rmat_vmult (struct FloatVect3 *vb, struct FloatRMat *m_a2b, struct FloatVect3 *va) |
rotate 3D vector by rotation matrix. | |
void | float_rmat_transp_vmult (struct FloatVect3 *vb, struct FloatRMat *m_b2a, struct FloatVect3 *va) |
rotate 3D vector by transposed rotation matrix. | |
void | float_rmat_mult (struct FloatEulers *rb, struct FloatRMat *m_a2b, struct FloatEulers *ra) |
rotate angle by rotation matrix. | |
void | float_rmat_transp_mult (struct FloatEulers *rb, struct FloatRMat *m_b2a, struct FloatEulers *ra) |
rotate angle by transposed rotation matrix. | |
void | float_rmat_ratemult (struct FloatRates *rb, struct FloatRMat *m_a2b, struct FloatRates *ra) |
rotate anglular rates by rotation matrix. | |
void | float_rmat_transp_ratemult (struct FloatRates *rb, struct FloatRMat *m_b2a, struct FloatRates *ra) |
rotate anglular rates by transposed rotation matrix. | |
void | float_rmat_of_axis_angle (struct FloatRMat *rm, struct FloatVect3 *uv, float angle) |
initialises a rotation matrix from unit vector axis and angle | |
void | float_rmat_of_eulers_321 (struct FloatRMat *rm, struct FloatEulers *e) |
Rotation matrix from 321 Euler angles (float). | |
void | float_rmat_of_eulers_312 (struct FloatRMat *rm, struct FloatEulers *e) |
void | float_rmat_of_quat (struct FloatRMat *rm, struct FloatQuat *q) |
void | float_rmat_integrate_fi (struct FloatRMat *rm, struct FloatRates *omega, float dt) |
in place first order integration of a rotation matrix | |
float | float_rmat_reorthogonalize (struct FloatRMat *rm) |
static void | float_quat_identity (struct FloatQuat *q) |
initialises a quaternion to identity | |
static float | float_quat_norm (struct FloatQuat *q) |
static void | float_quat_normalize (struct FloatQuat *q) |
static void | float_quat_invert (struct FloatQuat *qo, struct FloatQuat *qi) |
static void | float_quat_wrap_shortest (struct FloatQuat *q) |
void | float_quat_comp (struct FloatQuat *a2c, struct FloatQuat *a2b, struct FloatQuat *b2c) |
Composition (multiplication) of two quaternions. | |
void | float_quat_comp_inv (struct FloatQuat *a2b, struct FloatQuat *a2c, struct FloatQuat *b2c) |
Composition (multiplication) of two quaternions. | |
void | float_quat_inv_comp (struct FloatQuat *b2c, struct FloatQuat *a2b, struct FloatQuat *a2c) |
Composition (multiplication) of two quaternions. | |
void | float_quat_comp_norm_shortest (struct FloatQuat *a2c, struct FloatQuat *a2b, struct FloatQuat *b2c) |
Composition (multiplication) of two quaternions with normalization. | |
void | float_quat_comp_inv_norm_shortest (struct FloatQuat *a2b, struct FloatQuat *a2c, struct FloatQuat *b2c) |
Composition (multiplication) of two quaternions with normalization. | |
void | float_quat_inv_comp_norm_shortest (struct FloatQuat *b2c, struct FloatQuat *a2b, struct FloatQuat *a2c) |
Composition (multiplication) of two quaternions with normalization. | |
void | float_quat_derivative (struct FloatQuat *qd, struct FloatRates *r, struct FloatQuat *q) |
Quaternion derivative from rotational velocity. | |
void | float_quat_derivative_lagrange (struct FloatQuat *qd, struct FloatRates *r, struct FloatQuat *q) |
Quaternion derivative from rotational velocity with Lagrange multiplier. | |
void | float_quat_differential (struct FloatQuat *q_out, struct FloatRates *w, float dt) |
Delta rotation quaternion with constant angular rates. | |
void | float_quat_integrate_fi (struct FloatQuat *q, struct FloatRates *omega, float dt) |
in place first order quaternion integration with constant rotational velocity | |
void | float_quat_integrate (struct FloatQuat *q, struct FloatRates *omega, float dt) |
in place quaternion integration with constant rotational velocity | |
void | float_quat_vmult (struct FloatVect3 *v_out, struct FloatQuat *q, const struct FloatVect3 *v_in) |
rotate 3D vector by quaternion. | |
void | float_quat_of_eulers (struct FloatQuat *q, struct FloatEulers *e) |
Quaternion from Euler angles. | |
void | float_quat_of_eulers_zxy (struct FloatQuat *q, struct FloatEulers *e) |
quat from euler rotation 'ZXY' This rotation order is useful if you need 90 deg pitch | |
void | float_quat_of_eulers_yxz (struct FloatQuat *q, struct FloatEulers *e) |
quat from euler rotation 'YXZ' This function calculates a quaternion from Euler angles with the order YXZ, so pitch, roll, yaw, instead of the conventional ZYX order. | |
void | float_quat_of_axis_angle (struct FloatQuat *q, const struct FloatVect3 *uv, float angle) |
Quaternion from unit vector and angle. | |
void | float_quat_of_orientation_vect (struct FloatQuat *q, const struct FloatVect3 *ov) |
Quaternion from orientation vector. | |
void | float_quat_of_rmat (struct FloatQuat *q, struct FloatRMat *rm) |
Quaternion from rotation matrix. | |
void | float_quat_tilt_twist (struct FloatQuat *tilt, struct FloatQuat *twist, struct FloatQuat *quat) |
Tilt twist decomposition of quaternion. | |
static float | float_eulers_norm (struct FloatEulers *e) |
void | float_eulers_of_rmat (struct FloatEulers *e, struct FloatRMat *rm) |
void | float_eulers_of_quat (struct FloatEulers *e, struct FloatQuat *q) |
euler rotation 'ZYX' | |
void | float_eulers_of_quat_zxy (struct FloatEulers *e, struct FloatQuat *q) |
euler rotation 'ZXY' This rotation order is useful if you need 90 deg pitch | |
void | float_eulers_of_quat_yxz (struct FloatEulers *e, struct FloatQuat *q) |
euler rotation 'YXZ' This function calculates from a quaternion the Euler angles with the order YXZ, so pitch, roll, yaw, instead of the conventional ZYX order. | |
static void | float_vect_zero (float *a, const int n) |
a = 0 | |
static void | float_vect_copy (float *a, const float *b, const int n) |
a = b | |
static void | float_vect_sum (float *o, const float *a, const float *b, const int n) |
o = a + b | |
static void | float_vect_diff (float *o, const float *a, const float *b, const int n) |
o = a - b | |
static void | float_vect_mul (float *o, const float *a, const float *b, const int n) |
o = a * b (element wise) | |
static void | float_vect_add (float *a, const float *b, const int n) |
a += b | |
static void | float_vect_sub (float *a, const float *b, const int n) |
a -= b | |
static void | float_vect_smul (float *o, const float *a, const float s, const int n) |
o = a * s | |
static void | float_vect_sdiv (float *o, const float *a, const float s, const int n) |
o = a / s | |
static float | float_vect_norm (const float *a, const int n) |
||a|| | |
static void | float_vect_scale (float *a, const float s, const int n) |
a *= s | |
static float | float_vect_dot_product (const float *a, const float *b, const int n) |
a.b | |
void | float_mat_invert (float **o, float **mat, int n) |
Calculate inverse of any n x n matrix (passed as C array) o = mat^-1 Algorithm verified with Matlab. | |
void | float_mat_exp (float **a, float **o, int n) |
float | float_mat_norm_li (float **o, int m, int n) |
static void | float_mat_zero (float **a, int m, int n) |
a = 0 | |
static void | float_mat_copy (float **a, float **b, int m, int n) |
a = b | |
static void | float_mat_sum (float **o, float **a, float **b, int m, int n) |
o = a + b | |
static void | float_mat_diff (float **o, float **a, float **b, int m, int n) |
o = a - b | |
static void | float_mat_transpose_square (float **a, int n) |
transpose square matrix | |
static void | float_mat_transpose (float **o, float **a, int n, int m) |
transpose non-square matrix | |
static void | float_mat_mul (float **o, float **a, float **b, int m, int n, int l) |
o = a * b | |
static void | float_mat_mul_transpose (float **o, float **a, float **b, int m, int n, int l) |
o = a * b' | |
static void | float_mat_mul_copy (float **o, float **a, float **b, int m, int n, int l) |
o = a * b | |
static void | float_mat_vect_mul (float *o, float **a, float *b, int m, int n) |
o = a * b | |
static void | float_mat_scale (float **a, float k, int m, int n) |
a *= k, where k is a scalar value | |
static void | float_mat_sum_scaled (float **a, float **b, float k, int m, int n) |
a += k*b, where k is a scalar value | |
static void | float_mat_minor (float **o, float **a, int m, int n, int d) |
matrix minor | |
static void | float_mat_vmul (float **o, float *v, int n) |
o = I - v v^T | |
static void | float_mat_col (float *o, float **a, int m, int c) |
o = c-th column of matrix a[m x n] | |
static void | float_mat_diagonal_scal (float **o, float v, int n) |
Make an n x n identity matrix (for matrix passed as array) | |
static void | float_mat_div_scalar (float **o, float **a, float scalar, int m, int n) |
Divide a matrix by a scalar. | |
static void | float_mat_mul_scalar (float **o, float **a, float scalar, int m, int n) |
Multiply a matrix by a scalar. | |
bool | float_mat_inv_2d (float inv_out[4], float mat_in[4]) |
2x2 matrix inverse | |
void | float_mat2_mult (struct FloatVect2 *vect_out, float mat[4], struct FloatVect2 vect_in) |
Multiply 2D matrix with vector. | |
bool | float_mat_inv_3d (float inv_out[3][3], float mat_in[3][3]) |
3x3 matrix inverse | |
void | float_mat3_mult (struct FloatVect3 *vect_out, float mat[3][3], struct FloatVect3 vect_in) |
Multiply 3D matrix with vector. | |
bool | float_mat_inv_4d (float invOut[4][4], float mat_in[4][4]) |
4x4 Matrix inverse | |
void | float_vect3_bound_in_2d (struct FloatVect3 *vect3, float bound) |
void | float_vect3_bound_in_3d (struct FloatVect3 *vect3, float bound) |
void | float_vect3_scale_in_2d (struct FloatVect3 *vect3, float norm_des) |
void | float_vect2_bound_in_2d (struct FloatVect2 *vect2, float bound) |
void | float_vect2_scale_in_2d (struct FloatVect2 *vect2, float norm_des) |
Paparazzi floating point algebra.
Definition in file pprz_algebra_float.h.