Go to the documentation of this file.
28 TRACE(5, (
"Wrong input dimensions\n"));
35 for (i = 0; i < 3; i++){
122 mat_sub(&Wrm, &Whatm, &Whatem );
124 mat_sub(&Whatm, &Wm , &Wtildem);
149 mat_mul(&Jm, &Whatem, &tmp31Am);
155 mat_mul(&gain_Kwm, &Whatem, &vecCm);
172 for (i = 0; i < 3; i++ ) DRm.
pData[i] *= -controller->
gain_cR;
187 mat_mul(&gain_Kwm, &Wem, &tmp31Am);
191 for (i = 0; i < 3; i++ ) DWm.
pData[i] *= -controller->
gain_cw;
193 mat_mul(&gain_Cwm, &Wtildem, &tmp31Am);
214 mat_mul(&invJm, &tmp31Am, &tmp31Bm);
265 TRACE(5, (
"Bad inputs to the FOF attitude observer simulator\n"));
274 for (i = 0; i < 3; i++ ) tmp31m.
pData[i] = dt * deltaQm->
pData[i];
277 for (i = 0; i < 4; i++ ) Qm->
pData[i] = tmp41Bm.
pData[i];
284 for (i = 0; i < 3; i++ ) Wm->
pData[i] += dt * deltaWm->
pData[i];
303 TRACE(5, (
"The directional matrices must have three rows, and the gains must have a single row\n"));
307 TRACE(5, (
"The directional matrices must have at least three columns\n"));
311 TRACE(5, (
"The directional matrices must have the same number of columns\n"));
321 for ( i = 0; i < YAm->
numCols; i++ ){
323 for ( j = 0; j < 3; j++ ){
double measuredDirections[9]
void matrix_allocate(matrix_double_t *matrix, int numRows, int numCols)
Allocate memory for a matrix struct of given dimensions.
void matrix_zero(matrix_double_t *matrix)
Set all antries of a matrix to zero.
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.
int update_attitude_FOF_SO3_continuous_measurements(con_state_qw_fof_t *controller, matrix_double_t *y0m, matrix_double_t *y1m, matrix_double_t *y2m, matrix_double_t *y3m)
Help function used to update the measurements in the controller struct.
Matrix object used for all matrix manipulation.
int attitude_FOF_SO3_continuous_simulate_observer(matrix_double_t *Qm, matrix_double_t *Wm, matrix_double_t *deltaQm, matrix_double_t *deltaWm, double dt)
Help function to simulate the attitude observer dynamics.
void mat_add_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place matrix addition, A <– A + B, asserts that this is done correctly.
int attitude_FOF_SO3_continuous_cross_terms(matrix_double_t *YAm, matrix_double_t *YBm, matrix_double_t *gainm, matrix_double_t *outm)
Help function used to compute the innovation terms in the controller.
void mat_trans(matrix_double_t *Amat, matrix_double_t *ATmat)
Matrix transposition, A^T <– transpose(A), asserts that this is done correctly.
Reference signal structure for the attitude FSF on S(3) or SU(2)
int update_attitude_FOF_SO3_continuous(ref_state_qw_t *reference, dyn_state_qw_t *state, con_state_qw_fof_t *controller, double dt)
Update using the continuous filtered outpot feedback (FOF) on SO(3)
int cont_SU2_product(matrix_double_t *q, matrix_double_t *p, matrix_double_t *out)
Product of two elements of SU(2)
void matrix_set(matrix_double_t *mat, int row, int column, double value)
Set an entry of a matrix (irrespective of the used memory layout)
void matrix_define(matrix_double_t *matrix, int numRows, int numCols, double *data)
Define a matrix to use already allocated memory.
Complete state of the attitude FOF on SO(3) or SU(2)
Dynamical states, assumed known in the attitude FSF on SO(3) or SU(2)
void mat_mul(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
and asserts that this is done correctly
void mat_sub_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place subtraction addition, A <– A - B, asserts that this is done correctly.
void mat_sub(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix subtraction, C <– A - B, and asserts that this is done correctly.
int cont_quat_2_SO3(matrix_double_t *q, matrix_double_t *R)
Embedding relating SU(2) to SO(3)
void mat_add(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix addition, C <– A + B, asserts that this is done correctly.
double measuredGyrorates[3]
double globalDirections[9]
int cont_normalize(matrix_double_t *vec)
Normalizes the vector.
int cont_SU2_Exp(matrix_double_t *in, matrix_double_t *out)
The Exp map on SU(2)
double matrix_get(matrix_double_t *mat, int row, int column)
Get an entry of a matrix (irrespective of the used memory layout)