AerialVehicleControl.jl
|
#include "cont_math.h"
Go to the source code of this file.
Functions | |
int | cont_SU2_conjugate (matrix_double_t *qin, matrix_double_t *qout) |
Conjugate an element of SU(2) More... | |
int | cont_SU2_product (matrix_double_t *q, matrix_double_t *p, matrix_double_t *out) |
Product of two elements of SU(2) More... | |
int | cont_SU2_vee (matrix_double_t *in, matrix_double_t *out) |
The vee map on SU(2) More... | |
int | cont_SU2_hat (matrix_double_t *in, matrix_double_t *out) |
The hat map on SU(2) More... | |
int | cont_SU2_Exp (matrix_double_t *in, matrix_double_t *out) |
The Exp map on SU(2) More... | |
int | cont_SU2_triple (double a, double b, double c, matrix_double_t *out) |
Computes a triple product on SU(2) More... | |
double | cont_SU2_distance (matrix_double_t *q1, matrix_double_t *q2) |
Evaluate distance Gamma(q1, q2) in [0,2] defined on SU2. More... | |
int | cont_quat_2_SO3 (matrix_double_t *q, matrix_double_t *R) |
Embedding relating SU(2) to SO(3) More... | |
int | cont_SO3_hat (matrix_double_t *in, matrix_double_t *out) |
The hat operator on SO3. More... | |
int | cont_SO3_vee (matrix_double_t *in, matrix_double_t *out) |
The hat operator on SO3. More... | |
int | cont_SO3_Exp (matrix_double_t *in, matrix_double_t *out) |
The Exp map on SO3. More... | |
int | cont_SO3_Log (matrix_double_t *in, matrix_double_t *out) |
The Log map on SO3. More... | |
double | cont_SO3_distance (matrix_double_t *R1, matrix_double_t *R2) |
The distance Phi(R1, R2) defined on SO3. More... | |
double | cont_sinc (double x) |
Evaluates the sinc function as f(x) = sin(x)/x. More... | |
double | cont_dot_product (matrix_double_t *vecA, matrix_double_t *vecB) |
Evaluates the dot product of two vectors. More... | |
void | cont_cross_product (matrix_double_t *inAm, matrix_double_t *inBm, matrix_double_t *outm) |
Cross product operation, To be migrated to the cont_math stack. More... | |
double | cont_sign_func (double in) |
Takes the sign of the input, returning +1 if the input is zero. More... | |
int | cont_normalize (matrix_double_t *vec) |
Normalizes the vector. More... | |
void cont_cross_product | ( | matrix_double_t * | inAm, |
matrix_double_t * | inBm, | ||
matrix_double_t * | outm | ||
) |
Cross product operation, To be migrated to the cont_math stack.
[in] | inAm | - Input vector A in R^3 |
[in] | inBm | - Input vector B in R^3 |
[out] | outm | - Output as the cross-product of A and B, out=AxB, in R^3 |
Definition at line 359 of file cont_math.c.
double cont_dot_product | ( | matrix_double_t * | vecA, |
matrix_double_t * | vecB | ||
) |
Evaluates the dot product of two vectors.
[in] | vecA | - Input vector |
[in] | vecB | - Input vector |
Definition at line 343 of file cont_math.c.
int cont_normalize | ( | matrix_double_t * | vec | ) |
Normalizes the vector.
[out] | vec | - Input vector with either 1 row, or 1 column |
Definition at line 378 of file cont_math.c.
int cont_quat_2_SO3 | ( | matrix_double_t * | q, |
matrix_double_t * | R | ||
) |
Embedding relating SU(2) to SO(3)
[in] | q | - Pointer to a four-dimensional input quaternion |
[out] | R | - Pointer to an output 3x3 rotation matrix |
Definition at line 157 of file cont_math.c.
double cont_sign_func | ( | double | in | ) |
Takes the sign of the input, returning +1 if the input is zero.
[in] | in | - Input argument |
Definition at line 370 of file cont_math.c.
double cont_sinc | ( | double | x | ) |
Evaluates the sinc function as f(x) = sin(x)/x.
[in] | x | - the value at which the function is to be evaluated |
Definition at line 333 of file cont_math.c.
double cont_SO3_distance | ( | matrix_double_t * | R1, |
matrix_double_t * | R2 | ||
) |
The distance Phi(R1, R2) defined on SO3.
This distance is defined as Phi(R1, R2) = (1/2)Tr(I - R1'*R2) in [0,2]
[in] | R1 | - Pointer to an output 3x3 rotation matrix |
[in] | R2 | - Pointer to an output 3x3 rotation matrix |
Definition at line 302 of file cont_math.c.
int cont_SO3_Exp | ( | matrix_double_t * | u, |
matrix_double_t * | R | ||
) |
The Exp map on SO3.
[in] | u | - Pointer to a three-dimensional vector (one parameter group) |
[out] | R | - Pointer to an output 3x3 rotation matrix |
Definition at line 224 of file cont_math.c.
int cont_SO3_hat | ( | matrix_double_t * | in, |
matrix_double_t * | out | ||
) |
The hat operator on SO3.
[in] | in | - Pointer to a three-dimensional vector (one parameter group) |
[out] | out | - Pointer to an element of the 3x3 lie algebra of SO(3) |
Definition at line 186 of file cont_math.c.
int cont_SO3_Log | ( | matrix_double_t * | R, |
matrix_double_t * | u | ||
) |
The Log map on SO3.
[in] | R | - Pointer to an output 3x3 rotation matrix |
[out] | u | - Pointer to a three-dimensional vector (one parameter group) |
Definition at line 265 of file cont_math.c.
int cont_SO3_vee | ( | matrix_double_t * | in, |
matrix_double_t * | out | ||
) |
The hat operator on SO3.
[in] | in | - Pointer to an element of the 3x3 lie algebra of SO(3) |
[out] | out | - Pointer to a three-dimensional vector (one parameter group) |
Definition at line 207 of file cont_math.c.
int cont_SU2_conjugate | ( | matrix_double_t * | qin, |
matrix_double_t * | qout | ||
) |
Conjugate an element of SU(2)
[in] | qin | - Pointer to a four-dimensional input quaternion |
[out] | qout | - Pointer to a four-dimensional output quaternion |
Definition at line 10 of file cont_math.c.
double cont_SU2_distance | ( | matrix_double_t * | q1, |
matrix_double_t * | q2 | ||
) |
Evaluate distance Gamma(q1, q2) in [0,2] defined on SU2.
This distance is defined as Gamma(X1, X2) = (1/2)Tr(I - X1'*X2) in [0,2]
[in] | q1 | - Pointer to a four-dimensional input quaternion |
[in] | q2 | - Pointer to a four-dimensional output quaternion |
Definition at line 138 of file cont_math.c.
int cont_SU2_Exp | ( | matrix_double_t * | in, |
matrix_double_t * | out | ||
) |
The Exp map on SU(2)
[in] | in | - Pointer to a three-dimensional vector (one parameter group) |
[out] | out | - Pointer to an element of SU(2) (here a 4-dimenisonal vector) |
Definition at line 86 of file cont_math.c.
int cont_SU2_hat | ( | matrix_double_t * | in, |
matrix_double_t * | out | ||
) |
The hat map on SU(2)
[in] | in | - Pointer to a three-dimensional output (one parameter group) |
[out] | out | - Pointer to an input element of the lie-agbera of SU(2) |
Definition at line 69 of file cont_math.c.
int cont_SU2_product | ( | matrix_double_t * | q, |
matrix_double_t * | p, | ||
matrix_double_t * | out | ||
) |
Product of two elements of SU(2)
[in] | q | - Pointer to an input element of SU(2) (four-dimensional vector) |
[in] | p | - Pointer to an input element of SU(2) (four-dimensional vector) |
[out] | out | - Pointer to an output quaternion product (four-dimensional vector) |
Definition at line 28 of file cont_math.c.
int cont_SU2_triple | ( | double | a, |
double | b, | ||
double | c, | ||
matrix_double_t * | out | ||
) |
Computes a triple product on SU(2)
The inputs a, b, and c all represent angles in radians, and the triple product is computed by taking the exponential map with respect to these angles as
qa = Exp([a, 0, 0]) qb = Exp([0, b, 0]) qc = Exp([0, 0, c])
and then computing their consequtive product
out = qa * qb * qc
[in] | a | - Angle in radians |
[in] | b | - Angle in radians |
[in] | c | - Angle in radians |
[out] | out | - Pointer to an element of SU(2) (here a 4-dimenisonal vector) |
Definition at line 110 of file cont_math.c.
int cont_SU2_vee | ( | matrix_double_t * | in, |
matrix_double_t * | out | ||
) |
The vee map on SU(2)
[in] | in | - Pointer to an input element of the lie-agbera of SU(2) |
[out] | out | - Pointer to a three-dimensional output (one parameter group) |
Definition at line 53 of file cont_math.c.