PX4 Firmware
PX4 Autopilot Software http://px4.io
K_LOSY.c
Go to the documentation of this file.
1 t2 = 1.0/range;
2 t3 = q3*ve*2.0;
3 t4 = q0*vn*2.0;
4 t11 = q2*vd*2.0;
5 t5 = t3+t4-t11;
6 t6 = q0*q3*2.0;
7 t7 = q1*q2*2.0;
8 t8 = t6+t7;
9 t9 = q0*q2*2.0;
10 t28 = q1*q3*2.0;
12 t12 = P[0][0]*t2*t5;
13 t13 = q3*vd*2.0;
14 t14 = q2*ve*2.0;
15 t15 = q1*vn*2.0;
17 t17 = q0*vd*2.0;
18 t18 = q2*vn*2.0;
19 t29 = q1*ve*2.0;
21 t20 = q1*vd*2.0;
22 t21 = q0*ve*2.0;
23 t30 = q3*vn*2.0;
25 t23 = q0*q0;
26 t24 = q1*q1;
27 t25 = q2*q2;
28 t26 = q3*q3;
30 t31 = P[1][1]*t2*t16;
31 t32 = P[5][0]*t2*t8;
32 t33 = P[1][0]*t2*t16;
33 t34 = P[3][0]*t2*t22;
34 t35 = P[4][0]*t2*t27;
35 t80 = P[6][0]*t2*t10;
36 t81 = P[2][0]*t2*t19;
39 t38 = P[5][1]*t2*t8;
40 t39 = P[0][1]*t2*t5;
41 t40 = P[3][1]*t2*t22;
42 t41 = P[4][1]*t2*t27;
43 t82 = P[6][1]*t2*t10;
44 t83 = P[2][1]*t2*t19;
47 t44 = P[5][2]*t2*t8;
48 t45 = P[0][2]*t2*t5;
49 t46 = P[1][2]*t2*t16;
50 t47 = P[3][2]*t2*t22;
51 t48 = P[4][2]*t2*t27;
52 t79 = P[2][2]*t2*t19;
53 t84 = P[6][2]*t2*t10;
55 t50 = P[5][3]*t2*t8;
56 t51 = P[0][3]*t2*t5;
57 t52 = P[1][3]*t2*t16;
58 t53 = P[3][3]*t2*t22;
59 t54 = P[4][3]*t2*t27;
60 t86 = P[6][3]*t2*t10;
61 t87 = P[2][3]*t2*t19;
64 t57 = P[5][4]*t2*t8;
65 t58 = P[0][4]*t2*t5;
66 t59 = P[1][4]*t2*t16;
67 t60 = P[3][4]*t2*t22;
68 t61 = P[4][4]*t2*t27;
69 t88 = P[6][4]*t2*t10;
70 t89 = P[2][4]*t2*t19;
73 t64 = P[5][5]*t2*t8;
74 t65 = P[0][5]*t2*t5;
75 t66 = P[1][5]*t2*t16;
76 t67 = P[3][5]*t2*t22;
77 t68 = P[4][5]*t2*t27;
78 t90 = P[6][5]*t2*t10;
79 t91 = P[2][5]*t2*t19;
82 t71 = P[5][6]*t2*t8;
83 t72 = P[0][6]*t2*t5;
84 t73 = P[1][6]*t2*t16;
85 t74 = P[3][6]*t2*t22;
86 t75 = P[4][6]*t2*t27;
87 t92 = P[6][6]*t2*t10;
88 t93 = P[2][6]*t2*t19;
92 t77 = R_LOS+t37+t43+t56+t63+t70-t85-t94;
93 t78 = 1.0/t77;
94 A0[0][0] = -t78*(t12+P[0][5]*t2*t8-P[0][6]*t2*t10+P[0][1]*t2*t16-P[0][2]*t2*t19+P[0][3]*t2*t22+P[0][4]*t2*t27);
95 A0[1][0] = -t78*(t31+P[1][0]*t2*t5+P[1][5]*t2*t8-P[1][6]*t2*t10-P[1][2]*t2*t19+P[1][3]*t2*t22+P[1][4]*t2*t27);
96 A0[2][0] = -t78*(-t79+P[2][0]*t2*t5+P[2][5]*t2*t8-P[2][6]*t2*t10+P[2][1]*t2*t16+P[2][3]*t2*t22+P[2][4]*t2*t27);
97 A0[3][0] = -t78*(t53+P[3][0]*t2*t5+P[3][5]*t2*t8-P[3][6]*t2*t10+P[3][1]*t2*t16-P[3][2]*t2*t19+P[3][4]*t2*t27);
98 A0[4][0] = -t78*(t61+P[4][0]*t2*t5+P[4][5]*t2*t8-P[4][6]*t2*t10+P[4][1]*t2*t16-P[4][2]*t2*t19+P[4][3]*t2*t22);
99 A0[5][0] = -t78*(t64+P[5][0]*t2*t5-P[5][6]*t2*t10+P[5][1]*t2*t16-P[5][2]*t2*t19+P[5][3]*t2*t22+P[5][4]*t2*t27);
100 A0[6][0] = -t78*(-t92+P[6][0]*t2*t5+P[6][5]*t2*t8+P[6][1]*t2*t16-P[6][2]*t2*t19+P[6][3]*t2*t22+P[6][4]*t2*t27);
101 A0[7][0] = -t78*(P[7][0]*t2*t5+P[7][5]*t2*t8-P[7][6]*t2*t10+P[7][1]*t2*t16-P[7][2]*t2*t19+P[7][3]*t2*t22+P[7][4]*t2*t27);
102 A0[8][0] = -t78*(P[8][0]*t2*t5+P[8][5]*t2*t8-P[8][6]*t2*t10+P[8][1]*t2*t16-P[8][2]*t2*t19+P[8][3]*t2*t22+P[8][4]*t2*t27);
103 A0[9][0] = -t78*(P[9][0]*t2*t5+P[9][5]*t2*t8-P[9][6]*t2*t10+P[9][1]*t2*t16-P[9][2]*t2*t19+P[9][3]*t2*t22+P[9][4]*t2*t27);
104 A0[10][0] = -t78*(P[10][0]*t2*t5+P[10][5]*t2*t8-P[10][6]*t2*t10+P[10][1]*t2*t16-P[10][2]*t2*t19+P[10][3]*t2*t22+P[10][4]*t2*t27);
105 A0[11][0] = -t78*(P[11][0]*t2*t5+P[11][5]*t2*t8-P[11][6]*t2*t10+P[11][1]*t2*t16-P[11][2]*t2*t19+P[11][3]*t2*t22+P[11][4]*t2*t27);
106 A0[12][0] = -t78*(P[12][0]*t2*t5+P[12][5]*t2*t8-P[12][6]*t2*t10+P[12][1]*t2*t16-P[12][2]*t2*t19+P[12][3]*t2*t22+P[12][4]*t2*t27);
107 A0[13][0] = -t78*(P[13][0]*t2*t5+P[13][5]*t2*t8-P[13][6]*t2*t10+P[13][1]*t2*t16-P[13][2]*t2*t19+P[13][3]*t2*t22+P[13][4]*t2*t27);
108 A0[14][0] = -t78*(P[14][0]*t2*t5+P[14][5]*t2*t8-P[14][6]*t2*t10+P[14][1]*t2*t16-P[14][2]*t2*t19+P[14][3]*t2*t22+P[14][4]*t2*t27);
109 A0[15][0] = -t78*(P[15][0]*t2*t5+P[15][5]*t2*t8-P[15][6]*t2*t10+P[15][1]*t2*t16-P[15][2]*t2*t19+P[15][3]*t2*t22+P[15][4]*t2*t27);
110 A0[16][0] = -t78*(P[16][0]*t2*t5+P[16][5]*t2*t8-P[16][6]*t2*t10+P[16][1]*t2*t16-P[16][2]*t2*t19+P[16][3]*t2*t22+P[16][4]*t2*t27);
111 A0[17][0] = -t78*(P[17][0]*t2*t5+P[17][5]*t2*t8-P[17][6]*t2*t10+P[17][1]*t2*t16-P[17][2]*t2*t19+P[17][3]*t2*t22+P[17][4]*t2*t27);
112 A0[18][0] = -t78*(P[18][0]*t2*t5+P[18][5]*t2*t8-P[18][6]*t2*t10+P[18][1]*t2*t16-P[18][2]*t2*t19+P[18][3]*t2*t22+P[18][4]*t2*t27);
113 A0[19][0] = -t78*(P[19][0]*t2*t5+P[19][5]*t2*t8-P[19][6]*t2*t10+P[19][1]*t2*t16-P[19][2]*t2*t19+P[19][3]*t2*t22+P[19][4]*t2*t27);
114 A0[20][0] = -t78*(P[20][0]*t2*t5+P[20][5]*t2*t8-P[20][6]*t2*t10+P[20][1]*t2*t16-P[20][2]*t2*t19+P[20][3]*t2*t22+P[20][4]*t2*t27);
115 A0[21][0] = -t78*(P[21][0]*t2*t5+P[21][5]*t2*t8-P[21][6]*t2*t10+P[21][1]*t2*t16-P[21][2]*t2*t19+P[21][3]*t2*t22+P[21][4]*t2*t27);
116 A0[22][0] = -t78*(P[22][0]*t2*t5+P[22][5]*t2*t8-P[22][6]*t2*t10+P[22][1]*t2*t16-P[22][2]*t2*t19+P[22][3]*t2*t22+P[22][4]*t2*t27);
117 A0[23][0] = -t78*(P[23][0]*t2*t5+P[23][5]*t2*t8-P[23][6]*t2*t10+P[23][1]*t2*t16-P[23][2]*t2*t19+P[23][3]*t2*t22+P[23][4]*t2*t27);
t72
Definition: K_LOSY.c:83
t2
Definition: K_LOSY.c:1
t39
Definition: K_LOSY.c:40
t4
Definition: K_LOSY.c:3
t82
Definition: K_LOSY.c:43
t83
Definition: K_LOSY.c:44
t29
Definition: K_LOSY.c:19
t55
Definition: K_LOSY.c:62
t68
Definition: K_LOSY.c:77
t24
Definition: K_LOSY.c:26
t91
Definition: K_LOSY.c:79
t62
Definition: K_LOSY.c:71
t69
Definition: K_LOSY.c:80
t47
Definition: K_LOSY.c:50
t49
Definition: K_LOSY.c:54
t84
Definition: K_LOSY.c:53
t37
Definition: K_LOSY.c:38
t53
Definition: K_LOSY.c:58
t74
Definition: K_LOSY.c:85
t11
Definition: K_LOSY.c:4
t76
Definition: K_LOSY.c:89
t66
Definition: K_LOSY.c:75
t65
Definition: K_LOSY.c:74
t5
Definition: K_LOSY.c:5
t13
Definition: K_LOSY.c:13
t61
Definition: K_LOSY.c:68
t56
Definition: K_LOSY.c:63
t48
Definition: K_LOSY.c:51
t64
Definition: K_LOSY.c:73
A0[0][0]
Definition: K_LOSY.c:94
t14
Definition: K_LOSY.c:14
t93
Definition: K_LOSY.c:88
t30
Definition: K_LOSY.c:23
t23
Definition: K_LOSY.c:25
t60
Definition: K_LOSY.c:67
t10
Definition: K_LOSY.c:11
t26
Definition: K_LOSY.c:28
t21
Definition: K_LOSY.c:22
t78
Definition: K_LOSY.c:93
t20
Definition: K_LOSY.c:21
t8
Definition: K_LOSY.c:8
t17
Definition: K_LOSY.c:17
t79
Definition: K_LOSY.c:52
t38
Definition: K_LOSY.c:39
t89
Definition: K_LOSY.c:70
t46
Definition: K_LOSY.c:49
t40
Definition: K_LOSY.c:41
t54
Definition: K_LOSY.c:59
t75
Definition: K_LOSY.c:86
t25
Definition: K_LOSY.c:27
t59
Definition: K_LOSY.c:66
t77
Definition: K_LOSY.c:92
t27
Definition: K_LOSY.c:29
t58
Definition: K_LOSY.c:65
t18
Definition: K_LOSY.c:18
t45
Definition: K_LOSY.c:48
t52
Definition: K_LOSY.c:57
t43
Definition: K_LOSY.c:46
t12
Definition: K_LOSY.c:12
t22
Definition: K_LOSY.c:24
t15
Definition: K_LOSY.c:15
t50
Definition: K_LOSY.c:55
t63
Definition: K_LOSY.c:72
t36
Definition: K_LOSY.c:37
t9
Definition: K_LOSY.c:9
t33
Definition: K_LOSY.c:32
t32
Definition: K_LOSY.c:31
t80
Definition: K_LOSY.c:35
t85
Definition: K_LOSY.c:90
t6
Definition: K_LOSY.c:6
t94
Definition: K_LOSY.c:91
t42
Definition: K_LOSY.c:45
t44
Definition: K_LOSY.c:47
t88
Definition: K_LOSY.c:69
t7
Definition: K_LOSY.c:7
t57
Definition: K_LOSY.c:64
t51
Definition: K_LOSY.c:56
t3
Definition: K_LOSY.c:2
t16
Definition: K_LOSY.c:16
t19
Definition: K_LOSY.c:20
t34
Definition: K_LOSY.c:33
t73
Definition: K_LOSY.c:84
t87
Definition: K_LOSY.c:61
t35
Definition: K_LOSY.c:34
t31
Definition: K_LOSY.c:30
t81
Definition: K_LOSY.c:36
t90
Definition: K_LOSY.c:78
P[0][0]
Definition: quatCovMat.c:44
t71
Definition: K_LOSY.c:82
t70
Definition: K_LOSY.c:81
t86
Definition: K_LOSY.c:60
t92
Definition: K_LOSY.c:87
t41
Definition: K_LOSY.c:42
t28
Definition: K_LOSY.c:10
t67
Definition: K_LOSY.c:76