Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
eye.c File Reference
#include "eye.h"
#include "rt_nonfinite.h"
#include <string.h>
Include dependency graph for eye.c:

Go to the source code of this file.

Functions

void b_eye (double b_I[36])
 Creates a 6x6 identity matrix.
 
void eye (double b_I[9])
 Creates a 3x3 identity matrix.
 
void eye_attitude (double b_I[16])
 Creates a 4x4 identity matrix, typically for attitude calculations.
 
void eye_2 (double b_I[4])
 Creates a 2x2 identity matrix.
 

Function Documentation

◆ b_eye()

void b_eye ( double  b_I[36])

Creates a 6x6 identity matrix.

Parameters
[out]b_IPointer to a 36-element array where the 6x6 identity matrix will be stored.
Returns
None

Definition at line 21 of file eye.c.

22{
23 int k;
24 memset(&b_I[0], 0, 36U * sizeof(double));
25 for (k = 0; k < 6; k++) {
26 b_I[k + 6 * k] = 1.0;
27 }
28}

Referenced by mekf().

Here is the caller graph for this function:

◆ eye()

void eye ( double  b_I[9])

Creates a 3x3 identity matrix.

Parameters
[out]b_IPointer to a 9-element array where the 3x3 identity matrix will be stored.
Returns
None

Definition at line 34 of file eye.c.

35{
36 memset(&b_I[0], 0, 9U * sizeof(double));
37 b_I[0] = 1.0;
38 b_I[4] = 1.0;
39 b_I[8] = 1.0;
40}

Referenced by mekf().

Here is the caller graph for this function:

◆ eye_2()

void eye_2 ( double  b_I[4])

Creates a 2x2 identity matrix.

Parameters
[out]b_IPointer to a 4-element array where the 2x2 identity matrix will be stored.
Returns
None

Definition at line 56 of file eye.c.

57{
58 b_I[1] = 0.0;
59 b_I[2] = 0.0;
60 b_I[0] = 1.0;
61 b_I[3] = 1.0;
62}

◆ eye_attitude()

void eye_attitude ( double  b_I[16])

Creates a 4x4 identity matrix, typically for attitude calculations.

Parameters
[out]b_IPointer to a 16-element array where the 4x4 identity matrix will be stored.
Returns
None

Definition at line 46 of file eye.c.

47{
48 memset(&b_I[0], 0, 16U * sizeof(double));
49 b_I[0] = 1.0;
50 b_I[5] = 1.0;
51 b_I[10] = 1.0;
52 b_I[15] = 1.0;
53}

Referenced by attitude_estimation().

Here is the caller graph for this function: