calcF.m 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. function F = calcF(dax,dax_b,day,day_b,daz,daz_b,dvx,dvy,dvz,q0,q1,q2,q3)
  2. %CALCF
  3. % F = CALCF(DAX,DAX_B,DAY,DAY_B,DAZ,DAZ_B,DVX,DVY,DVZ,Q0,Q1,Q2,Q3)
  4. % This function was generated by the Symbolic Math Toolbox version 5.8.
  5. % 27-Dec-2014 13:59:07
  6. t2 = dax.*(1.0./2.0);
  7. t3 = dax_b.*(1.0./2.0);
  8. t4 = t2-t3;
  9. t5 = day.*(1.0./2.0);
  10. t6 = day_b.*(1.0./2.0);
  11. t7 = t5-t6;
  12. t8 = daz.*(1.0./2.0);
  13. t9 = daz_b.*(1.0./2.0);
  14. t10 = t8-t9;
  15. t11 = q2.*t4.*(1.0./2.0);
  16. t12 = q1.*t7.*(1.0./2.0);
  17. t13 = q0.*t10.*(1.0./2.0);
  18. t14 = q2.*(1.0./2.0);
  19. t15 = q3.*t4.*(1.0./2.0);
  20. t16 = q1.*t10.*(1.0./2.0);
  21. t17 = q1.*(1.0./2.0);
  22. t18 = q0.*t4.*(1.0./2.0);
  23. t19 = q3.*t7.*(1.0./2.0);
  24. t20 = q0.*(1.0./2.0);
  25. t21 = q2.*t7.*(1.0./2.0);
  26. t22 = q3.*t10.*(1.0./2.0);
  27. t23 = q0.*t7.*(1.0./2.0);
  28. t24 = q3.*(1.0./2.0);
  29. t25 = q1.*t4.*(1.0./2.0);
  30. t26 = q2.*t10.*(1.0./2.0);
  31. t27 = t20-t21+t22+t25;
  32. t28 = -t17+t18+t19+t26;
  33. t29 = t14-t15+t16+t23;
  34. t30 = t11+t12-t13+t24;
  35. t31 = t17-t18+t19+t26;
  36. t32 = t20+t21-t22+t25;
  37. t33 = t11-t12+t13+t24;
  38. t34 = -t14+t15+t16+t23;
  39. t35 = q0.^2;
  40. t36 = q1.^2;
  41. t37 = q2.^2;
  42. t38 = q3.^2;
  43. t39 = -t35-t36-t37-t38;
  44. t40 = t14+t15+t16-t23;
  45. t41 = t11+t12+t13-t24;
  46. t42 = t20+t21+t22-t25;
  47. t43 = t17+t18+t19-t26;
  48. t44 = q0.*q2.*2.0;
  49. t45 = q1.*q3.*2.0;
  50. t46 = t44+t45;
  51. t47 = t35+t36-t37-t38;
  52. t48 = q0.*q3.*2.0;
  53. t52 = q1.*q2.*2.0;
  54. t49 = t48-t52;
  55. t50 = q0.*q1.*2.0;
  56. t55 = q2.*q3.*2.0;
  57. t51 = t50-t55;
  58. t53 = t35-t36+t37-t38;
  59. t54 = t48+t52;
  60. t56 = t35-t36-t37+t38;
  61. t57 = t50+t55;
  62. t58 = t44-t45;
  63. F = reshape([q3.*(q3.*(-1.0./2.0)+t11+t12+t13).*-2.0+q2.*(t14+t15+t16-q0.*t7.*(1.0./2.0)).*2.0+q1.*(t17+t18+t19-q2.*t10.*(1.0./2.0)).*2.0+q0.*(t20+t21+t22-q1.*t4.*(1.0./2.0)).*2.0,q0.*t41.*-2.0-q1.*t40.*2.0+q2.*t43.*2.0-q3.*t42.*2.0,q0.*t40.*-2.0+q1.*t41.*2.0+q2.*t42.*2.0+q3.*t43.*2.0,dvy.*t46+dvz.*t49,-dvy.*t51-dvz.*t53,dvy.*t56-dvz.*t57,0.0,0.0,0.0,q0.*t30.*-2.0+q1.*t29.*2.0+q2.*t28.*2.0+q3.*t27.*2.0,q0.*t27.*2.0-q1.*t28.*2.0+q2.*t29.*2.0+q3.*t30.*2.0,q0.*t28.*-2.0-q1.*t27.*2.0-q2.*t30.*2.0+q3.*t29.*2.0,-dvx.*t46+dvz.*t47,dvx.*t51+dvz.*t54,-dvx.*t56-dvz.*t58,0.0,0.0,0.0,q0.*t34.*-2.0+q1.*t33.*2.0-q2.*t32.*2.0-q3.*t31.*2.0,q0.*t31.*-2.0+q1.*t32.*2.0+q2.*t33.*2.0+q3.*t34.*2.0,q0.*t32.*2.0+q1.*t31.*2.0-q2.*t34.*2.0+q3.*t33.*2.0,-dvx.*t49-dvy.*t47,dvx.*t53-dvy.*t54,dvx.*t57+dvy.*t58,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,t39,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,t39,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,t39,0.0,0.0,0.0,0.0,0.0,1.0],[9, 9]);