APM:Libraries
calcH_MAG.cpp
Go to the documentation of this file.
1 float t2 = cos(gPhi);
2 float t3 = cos(gTheta);
3 float t4 = sin(gPhi);
4 float t5 = sin(gTheta);
5 float t6 = q0*q0;
6 float t7 = q1*q1;
7 float t8 = q2*q2;
8 float t9 = q3*q3;
9 float t10 = t6+t7-t8-t9;
10 float t11 = sin(gPsi);
11 float t12 = cos(gPsi);
12 float t13 = q0*q2*2.0f;
13 float t14 = q1*q3*2.0f;
14 float t15 = t13+t14;
15 float t16 = q0*q3*2.0f;
16 float t18 = q1*q2*2.0f;
17 float t17 = t16-t18;
18 float t19 = t3*t11;
19 float t20 = t4*t5*t12;
20 float t21 = t19+t20;
21 float t22 = t16+t18;
22 float t23 = t5*t11;
23 float t41 = t3*t4*t12;
24 float t24 = t23-t41;
25 float t25 = q0*q1*2.0f;
26 float t31 = q2*q3*2.0f;
27 float t26 = t25-t31;
28 float t27 = t6-t7+t8-t9;
29 float t28 = t5*t12;
30 float t29 = t3*t4*t11;
31 float t30 = t28+t29;
32 float t32 = t3*t12;
33 float t46 = t4*t5*t11;
34 float t33 = t32-t46;
35 float t35 = t4*t17;
36 float t36 = t2*t5*t10;
37 float t37 = t2*t3*t15;
38 float t38 = t35+t36-t37;
39 float t39 = magZ*t38;
40 float t40 = t10*t21;
41 float t42 = t15*t24;
42 float t43 = t2*t12*t17;
43 float t44 = t40+t42-t43;
44 float t45 = magY*t44;
45 float t47 = t10*t33;
46 float t48 = t15*t30;
47 float t49 = t2*t11*t17;
48 float t50 = t47+t48+t49;
49 float t51 = magX*t50;
50 float t52 = -t39+t45+t51;
51 float t53 = 1.0/t52;
52 float t54 = t4*t27;
53 float t55 = t2*t3*t26;
54 float t56 = t2*t5*t22;
55 float t57 = -t54+t55+t56;
56 float t58 = magZ*t57;
57 float t59 = t21*t22;
58 float t60 = t24*t26;
59 float t61 = t2*t12*t27;
60 float t62 = t59-t60+t61;
61 float t63 = magY*t62;
62 float t64 = t26*t30;
63 float t65 = t22*t33;
64 float t66 = t2*t11*t27;
65 float t67 = t64-t65+t66;
66 float t68 = magX*t67;
67 float t69 = t58-t63+t68;
68 float t70 = t53*t69;
69 float t34 = tan(t70);
70 float t71 = t34*t34;
71 float t72 = t71+1.0;
72 float t73 = 1.0/(t52*t52);
73 A0[0][0] = -t72*(t53*(magZ*(t4*t26+t2*t3*t27)+magY*(t24*t27+t2*t12*t26)+magX*(t27*t30-t2*t11*t26))-t69*t73*(magZ*(t4*t15+t2*t3*t17)+magY*(t17*t24+t2*t12*t15)+magX*(t17*t30-t2*t11*t15)));
74 A0[0][1] = t72*(t53*(magZ*(t2*t3*t22-t2*t5*t26)+magY*(t22*t24+t21*t26)+magX*(t22*t30+t26*t33))+t69*t73*(magZ*(t2*t3*t10+t2*t5*t15)+magY*(t10*t24-t15*t21)+magX*(t10*t30-t15*t33)));
75 A0[0][2] = t72*(t53*(-magZ*(t4*t22+t2*t5*t27)+magY*(t21*t27-t2*t12*t22)+magX*(t27*t33+t2*t11*t22))-t69*t73*(magZ*(t4*t10-t2*t5*t17)+magY*(t17*t21+t2*t10*t12)+magX*(t17*t33-t2*t10*t11)));
float t7
Definition: calcH_MAG.cpp:6
float t35
Definition: calcH_MAG.cpp:35
float t42
Definition: calcH_MAG.cpp:41
float t11
Definition: calcH_MAG.cpp:10
float t8
Definition: calcH_MAG.cpp:7
float t66
Definition: calcH_MAG.cpp:64
float t36
Definition: calcH_MAG.cpp:36
float t69
Definition: calcH_MAG.cpp:67
float t41
Definition: calcH_MAG.cpp:23
float t29
Definition: calcH_MAG.cpp:30
float t51
Definition: calcH_MAG.cpp:49
float t32
Definition: calcH_MAG.cpp:32
float t63
Definition: calcH_MAG.cpp:61
float t62
Definition: calcH_MAG.cpp:60
float t6
Definition: calcH_MAG.cpp:5
float t59
Definition: calcH_MAG.cpp:57
float t3
Definition: calcH_MAG.cpp:2
float t49
Definition: calcH_MAG.cpp:47
float t20
Definition: calcH_MAG.cpp:19
float t61
Definition: calcH_MAG.cpp:59
float t37
Definition: calcH_MAG.cpp:37
float t64
Definition: calcH_MAG.cpp:62
float t15
Definition: calcH_MAG.cpp:14
float t34
Definition: calcH_MAG.cpp:69
float t17
Definition: calcH_MAG.cpp:17
float t18
Definition: calcH_MAG.cpp:16
float t12
Definition: calcH_MAG.cpp:11
float t57
Definition: calcH_MAG.cpp:55
float t25
Definition: calcH_MAG.cpp:25
float t5
Definition: calcH_MAG.cpp:4
float t16
Definition: calcH_MAG.cpp:15
float t50
Definition: calcH_MAG.cpp:48
float t33
Definition: calcH_MAG.cpp:34
float t14
Definition: calcH_MAG.cpp:13
float t4
Definition: calcH_MAG.cpp:3
float t56
Definition: calcH_MAG.cpp:54
float t44
Definition: calcH_MAG.cpp:43
float t13
Definition: calcH_MAG.cpp:12
float t67
Definition: calcH_MAG.cpp:65
float t23
Definition: calcH_MAG.cpp:22
float t45
Definition: calcH_MAG.cpp:44
float t40
Definition: calcH_MAG.cpp:40
float t39
Definition: calcH_MAG.cpp:39
float t65
Definition: calcH_MAG.cpp:63
float t19
Definition: calcH_MAG.cpp:18
float t58
Definition: calcH_MAG.cpp:56
float t55
Definition: calcH_MAG.cpp:53
float t53
Definition: calcH_MAG.cpp:51
float t71
Definition: calcH_MAG.cpp:70
float t60
Definition: calcH_MAG.cpp:58
float t38
Definition: calcH_MAG.cpp:38
float t54
Definition: calcH_MAG.cpp:52
float t43
Definition: calcH_MAG.cpp:42
float t48
Definition: calcH_MAG.cpp:46
float t10
Definition: calcH_MAG.cpp:9
float t22
Definition: calcH_MAG.cpp:21
float t52
Definition: calcH_MAG.cpp:50
float t9
Definition: calcH_MAG.cpp:8
float t28
Definition: calcH_MAG.cpp:29
float t72
Definition: calcH_MAG.cpp:71
float t26
Definition: calcH_MAG.cpp:27
float t30
Definition: calcH_MAG.cpp:31
float t73
Definition: calcH_MAG.cpp:72
float t24
Definition: calcH_MAG.cpp:24
float t21
Definition: calcH_MAG.cpp:20
float t70
Definition: calcH_MAG.cpp:68
float t47
Definition: calcH_MAG.cpp:45
float t2
Definition: calcH_MAG.cpp:1
float t68
Definition: calcH_MAG.cpp:66
float t27
Definition: calcH_MAG.cpp:28
float t31
Definition: calcH_MAG.cpp:26
float t46
Definition: calcH_MAG.cpp:33
A0[0][0]
Definition: calcH_MAG.cpp:73