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