Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
eye.c
Go to the documentation of this file.
1/*
2 * Academic License - for use in teaching, academic research, and meeting
3 * course requirements at degree granting institutions only. Not for
4 * government, commercial, or other organizational use.
5 * File: eye.c
6 *
7 * MATLAB Coder version : 24.2
8 * C/C++ source code generated on : 01-Mar-2025 17:31:47
9 */
10
11/* Include Files */
12#include "eye.h"
13#include "rt_nonfinite.h"
14#include <string.h>
15
16/* Function Definitions */
17/*
18 * Arguments : double b_I[36]
19 * Return Type : void
20 */
21void b_eye(double b_I[36])
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}
29
30/*
31 * Arguments : double b_I[9]
32 * Return Type : void
33 */
34void eye(double b_I[9])
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}
41
42/*
43 * Arguments : double b_I[9]
44 * Return Type : void
45 */
46void eye_attitude(double b_I[16])
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}
54
55
56void eye_2(double b_I[4])
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}
63
64/*
65 * File trailer for eye.c
66 *
67 * [EOF]
68 */
void eye_2(double b_I[4])
Creates a 2x2 identity matrix.
Definition eye.c:56
void eye_attitude(double b_I[16])
Creates a 4x4 identity matrix, typically for attitude calculations.
Definition eye.c:46
void b_eye(double b_I[36])
Creates a 6x6 identity matrix.
Definition eye.c:21
void eye(double b_I[9])
Creates a 3x3 identity matrix.
Definition eye.c:34
Utility functions for creating identity matrices of various sizes.
Provides definitions and utility functions for non-finite floating-point values.