aboutsummaryrefslogtreecommitdiff
path: root/apps/attitude_estimator_ekf/codegen/diag.c
blob: 58e9f553f464508c9e9ad9f8c5549faeb12b7a18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * diag.c
 *
 * Code generation for function 'diag'
 *
 * C source code generated on: Sat Oct 13 16:28:18 2012
 *
 */

/* Include files */
#include "rt_nonfinite.h"
#include "attitudeKalmanfilter.h"
#include "diag.h"

/* Type Definitions */

/* Named Constants */

/* Variable Declarations */

/* Variable Definitions */

/* Function Declarations */

/* Function Definitions */

/*
 *
 */
void b_diag(const real32_T v[3], real32_T d[9])
{
  int32_T j;
  for (j = 0; j < 9; j++) {
    d[j] = 0.0F;
  }

  for (j = 0; j < 3; j++) {
    d[j + 3 * j] = v[j];
  }
}

/*
 *
 */
void c_diag(const real32_T v[6], real32_T d[36])
{
  int32_T j;
  memset(&d[0], 0, 36U * sizeof(real32_T));
  for (j = 0; j < 6; j++) {
    d[j + 6 * j] = v[j];
  }
}

/*
 *
 */
void diag(const real32_T v[9], real32_T d[81])
{
  int32_T j;
  memset(&d[0], 0, 81U * sizeof(real32_T));
  for (j = 0; j < 9; j++) {
    d[j + 9 * j] = v[j];
  }
}

/* End of code generation (diag.c) */