Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "rt_nonfinite.h"
00012 #include "autogen_ekf_propagation.h"
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 void autogen_ekf_propagation(const real32_T eml_in1[20], const real32_T eml_in2
00026 [3], const real32_T eml_in3[3], real32_T eml_dt,
00027 real32_T eml_x_new[16])
00028 {
00029 real32_T eml_t17;
00030 real32_T eml_t18;
00031 real32_T eml_t19;
00032 real32_T eml_t20;
00033 real32_T eml_t21;
00034 real32_T eml_t22;
00035 real32_T eml_t23;
00036 real32_T eml_t24;
00037 real32_T eml_t25;
00038 real32_T eml_t26;
00039 real32_T eml_t27;
00040 real32_T eml_t28;
00041 real32_T eml_t29;
00042 real32_T eml_t30;
00043
00044
00045
00046
00047
00048 eml_t17 = eml_in2[1] - eml_in1[14];
00049 eml_t18 = rt_pow32_snf(eml_in1[6], 2.0F);
00050 eml_t19 = rt_pow32_snf(eml_in1[7], 2.0F);
00051 eml_t20 = rt_pow32_snf(eml_in1[8], 2.0F);
00052 eml_t21 = rt_pow32_snf(eml_in1[9], 2.0F);
00053 eml_t22 = eml_in2[0] - eml_in1[13];
00054 eml_t23 = eml_in1[7] * eml_in1[8] * 2.0F;
00055 eml_t24 = eml_in2[2] - eml_in1[15];
00056 eml_t25 = eml_in1[6] * eml_in1[8] * 2.0F;
00057 eml_t26 = eml_in1[7] * eml_in1[9] * 2.0F;
00058 eml_t27 = eml_in1[6] * eml_in1[7] * 2.0F;
00059 eml_t28 = eml_in3[0] - eml_in1[10];
00060 eml_t29 = eml_in3[1] - eml_in1[11];
00061 eml_t30 = eml_in3[2] - eml_in1[12];
00062 eml_x_new[0] = eml_in1[0] + eml_dt * eml_in1[3];
00063 eml_x_new[1] = eml_in1[1] + eml_dt * eml_in1[4];
00064 eml_x_new[2] = eml_in1[2] + eml_dt * eml_in1[5];
00065 eml_x_new[3] = eml_in1[3] + eml_dt * ((eml_t24 * (eml_t25 + eml_t26) + eml_t22
00066 * (((eml_t18 + eml_t19) - eml_t20) - eml_t21)) +
00067 eml_t17 * (eml_t23 - eml_in1[6] * eml_in1[9] * 2.0F));
00068 eml_x_new[4] = eml_in1[4] + eml_dt * ((eml_t17 * (((eml_t18 - eml_t19) +
00069 eml_t20) - eml_t21) + eml_t22 * (eml_t23 + eml_in1[6]
00070 * eml_in1[9] * 2.0F)) - eml_t24 * (eml_t27 - eml_in1[8] * eml_in1[9] * 2.0F));
00071 eml_x_new[5] = eml_in1[5] - eml_dt * (((eml_t22 * (eml_t25 - eml_t26) -
00072 eml_t24 * (((eml_t18 - eml_t19) - eml_t20) + eml_t21))
00073 - eml_t17 * (eml_t27 + eml_in1[8] * eml_in1[9] * 2.0F)) + 9.81F);
00074 eml_x_new[6] = ((eml_in1[6] - eml_dt * eml_t28 * eml_in1[7] * 0.5F) - eml_dt *
00075 eml_t29 * eml_in1[8] * 0.5F) - eml_dt * eml_t30
00076 * eml_in1[9] * 0.5F;
00077 eml_x_new[7] = ((eml_in1[7] + eml_dt * eml_t28 * eml_in1[6] * 0.5F) - eml_dt *
00078 eml_t29 * eml_in1[9] * 0.5F) + eml_dt * eml_t30
00079 * eml_in1[8] * 0.5F;
00080 eml_x_new[8] = ((eml_in1[8] + eml_dt * eml_t28 * eml_in1[9] * 0.5F) + eml_dt *
00081 eml_t29 * eml_in1[6] * 0.5F) - eml_dt * eml_t30
00082 * eml_in1[7] * 0.5F;
00083 eml_x_new[9] = ((eml_in1[9] - eml_dt * eml_t28 * eml_in1[8] * 0.5F) + eml_dt *
00084 eml_t29 * eml_in1[7] * 0.5F) + eml_dt * eml_t30
00085 * eml_in1[6] * 0.5F;
00086 eml_x_new[10] = eml_in1[10];
00087 eml_x_new[11] = eml_in1[11];
00088 eml_x_new[12] = eml_in1[12];
00089 eml_x_new[13] = eml_in1[13];
00090 eml_x_new[14] = eml_in1[14];
00091 eml_x_new[15] = eml_in1[15];
00092 }
00093
00094