#include "live.h" namespace { #define DIM 22 #define EDIM 21 #define MEDIM 21 typedef void (*Hfun)(double *, double *, double *); const static double MAHA_THRESH_4 = 7.814727903251177; const static double MAHA_THRESH_9 = 7.814727903251177; const static double MAHA_THRESH_10 = 7.814727903251177; const static double MAHA_THRESH_12 = 7.814727903251177; const static double MAHA_THRESH_35 = 7.814727903251177; const static double MAHA_THRESH_32 = 9.487729036781154; const static double MAHA_THRESH_13 = 7.814727903251177; const static double MAHA_THRESH_14 = 7.814727903251177; const static double MAHA_THRESH_33 = 7.814727903251177; /****************************************************************************** * Code generated with SymPy 1.12 * * * * See http://www.sympy.org/ for more information. * * * * This file is part of 'ekf' * ******************************************************************************/ void H(double *in_vec, double *out_3790361225464775609) { out_3790361225464775609[0] = 0; out_3790361225464775609[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5]; out_3790361225464775609[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; out_3790361225464775609[3] = cos(in_vec[1])*cos(in_vec[2]); out_3790361225464775609[4] = sin(in_vec[2])*cos(in_vec[1]); out_3790361225464775609[5] = -sin(in_vec[1]); out_3790361225464775609[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5]; out_3790361225464775609[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; out_3790361225464775609[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4]; out_3790361225464775609[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); out_3790361225464775609[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); out_3790361225464775609[11] = sin(in_vec[0])*cos(in_vec[1]); out_3790361225464775609[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5]; out_3790361225464775609[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; out_3790361225464775609[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3]; out_3790361225464775609[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); out_3790361225464775609[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); out_3790361225464775609[17] = cos(in_vec[0])*cos(in_vec[1]); } void err_fun(double *nom_x, double *delta_x, double *out_256117888307370669) { out_256117888307370669[0] = delta_x[0] + nom_x[0]; out_256117888307370669[1] = delta_x[1] + nom_x[1]; out_256117888307370669[2] = delta_x[2] + nom_x[2]; out_256117888307370669[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3]; out_256117888307370669[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4]; out_256117888307370669[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5]; out_256117888307370669[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6]; out_256117888307370669[7] = delta_x[6] + nom_x[7]; out_256117888307370669[8] = delta_x[7] + nom_x[8]; out_256117888307370669[9] = delta_x[8] + nom_x[9]; out_256117888307370669[10] = delta_x[9] + nom_x[10]; out_256117888307370669[11] = delta_x[10] + nom_x[11]; out_256117888307370669[12] = delta_x[11] + nom_x[12]; out_256117888307370669[13] = delta_x[12] + nom_x[13]; out_256117888307370669[14] = delta_x[13] + nom_x[14]; out_256117888307370669[15] = delta_x[14] + nom_x[15]; out_256117888307370669[16] = delta_x[15] + nom_x[16]; out_256117888307370669[17] = delta_x[16] + nom_x[17]; out_256117888307370669[18] = delta_x[17] + nom_x[18]; out_256117888307370669[19] = delta_x[18] + nom_x[19]; out_256117888307370669[20] = delta_x[19] + nom_x[20]; out_256117888307370669[21] = delta_x[20] + nom_x[21]; } void inv_err_fun(double *nom_x, double *true_x, double *out_168922684109069761) { out_168922684109069761[0] = -nom_x[0] + true_x[0]; out_168922684109069761[1] = -nom_x[1] + true_x[1]; out_168922684109069761[2] = -nom_x[2] + true_x[2]; out_168922684109069761[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5]; out_168922684109069761[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4]; out_168922684109069761[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3]; out_168922684109069761[6] = -nom_x[7] + true_x[7]; out_168922684109069761[7] = -nom_x[8] + true_x[8]; out_168922684109069761[8] = -nom_x[9] + true_x[9]; out_168922684109069761[9] = -nom_x[10] + true_x[10]; out_168922684109069761[10] = -nom_x[11] + true_x[11]; out_168922684109069761[11] = -nom_x[12] + true_x[12]; out_168922684109069761[12] = -nom_x[13] + true_x[13]; out_168922684109069761[13] = -nom_x[14] + true_x[14]; out_168922684109069761[14] = -nom_x[15] + true_x[15]; out_168922684109069761[15] = -nom_x[16] + true_x[16]; out_168922684109069761[16] = -nom_x[17] + true_x[17]; out_168922684109069761[17] = -nom_x[18] + true_x[18]; out_168922684109069761[18] = -nom_x[19] + true_x[19]; out_168922684109069761[19] = -nom_x[20] + true_x[20]; out_168922684109069761[20] = -nom_x[21] + true_x[21]; } void H_mod_fun(double *state, double *out_1717307412409030834) { out_1717307412409030834[0] = 1.0; out_1717307412409030834[1] = 0; out_1717307412409030834[2] = 0; out_1717307412409030834[3] = 0; out_1717307412409030834[4] = 0; out_1717307412409030834[5] = 0; out_1717307412409030834[6] = 0; out_1717307412409030834[7] = 0; out_1717307412409030834[8] = 0; out_1717307412409030834[9] = 0; out_1717307412409030834[10] = 0; out_1717307412409030834[11] = 0; out_1717307412409030834[12] = 0; out_1717307412409030834[13] = 0; out_1717307412409030834[14] = 0; out_1717307412409030834[15] = 0; out_1717307412409030834[16] = 0; out_1717307412409030834[17] = 0; out_1717307412409030834[18] = 0; out_1717307412409030834[19] = 0; out_1717307412409030834[20] = 0; out_1717307412409030834[21] = 0; out_1717307412409030834[22] = 1.0; out_1717307412409030834[23] = 0; out_1717307412409030834[24] = 0; out_1717307412409030834[25] = 0; out_1717307412409030834[26] = 0; out_1717307412409030834[27] = 0; out_1717307412409030834[28] = 0; out_1717307412409030834[29] = 0; out_1717307412409030834[30] = 0; out_1717307412409030834[31] = 0; out_1717307412409030834[32] = 0; out_1717307412409030834[33] = 0; out_1717307412409030834[34] = 0; out_1717307412409030834[35] = 0; out_1717307412409030834[36] = 0; out_1717307412409030834[37] = 0; out_1717307412409030834[38] = 0; out_1717307412409030834[39] = 0; out_1717307412409030834[40] = 0; out_1717307412409030834[41] = 0; out_1717307412409030834[42] = 0; out_1717307412409030834[43] = 0; out_1717307412409030834[44] = 1.0; out_1717307412409030834[45] = 0; out_1717307412409030834[46] = 0; out_1717307412409030834[47] = 0; out_1717307412409030834[48] = 0; out_1717307412409030834[49] = 0; out_1717307412409030834[50] = 0; out_1717307412409030834[51] = 0; out_1717307412409030834[52] = 0; out_1717307412409030834[53] = 0; out_1717307412409030834[54] = 0; out_1717307412409030834[55] = 0; out_1717307412409030834[56] = 0; out_1717307412409030834[57] = 0; out_1717307412409030834[58] = 0; out_1717307412409030834[59] = 0; out_1717307412409030834[60] = 0; out_1717307412409030834[61] = 0; out_1717307412409030834[62] = 0; out_1717307412409030834[63] = 0; out_1717307412409030834[64] = 0; out_1717307412409030834[65] = 0; out_1717307412409030834[66] = -0.5*state[4]; out_1717307412409030834[67] = -0.5*state[5]; out_1717307412409030834[68] = -0.5*state[6]; out_1717307412409030834[69] = 0; out_1717307412409030834[70] = 0; out_1717307412409030834[71] = 0; out_1717307412409030834[72] = 0; out_1717307412409030834[73] = 0; out_1717307412409030834[74] = 0; out_1717307412409030834[75] = 0; out_1717307412409030834[76] = 0; out_1717307412409030834[77] = 0; out_1717307412409030834[78] = 0; out_1717307412409030834[79] = 0; out_1717307412409030834[80] = 0; out_1717307412409030834[81] = 0; out_1717307412409030834[82] = 0; out_1717307412409030834[83] = 0; out_1717307412409030834[84] = 0; out_1717307412409030834[85] = 0; out_1717307412409030834[86] = 0; out_1717307412409030834[87] = 0.5*state[3]; out_1717307412409030834[88] = 0.5*state[6]; out_1717307412409030834[89] = -0.5*state[5]; out_1717307412409030834[90] = 0; out_1717307412409030834[91] = 0; out_1717307412409030834[92] = 0; out_1717307412409030834[93] = 0; out_1717307412409030834[94] = 0; out_1717307412409030834[95] = 0; out_1717307412409030834[96] = 0; out_1717307412409030834[97] = 0; out_1717307412409030834[98] = 0; out_1717307412409030834[99] = 0; out_1717307412409030834[100] = 0; out_1717307412409030834[101] = 0; out_1717307412409030834[102] = 0; out_1717307412409030834[103] = 0; out_1717307412409030834[104] = 0; out_1717307412409030834[105] = 0; out_1717307412409030834[106] = 0; out_1717307412409030834[107] = 0; out_1717307412409030834[108] = -0.5*state[6]; out_1717307412409030834[109] = 0.5*state[3]; out_1717307412409030834[110] = 0.5*state[4]; out_1717307412409030834[111] = 0; out_1717307412409030834[112] = 0; out_1717307412409030834[113] = 0; out_1717307412409030834[114] = 0; out_1717307412409030834[115] = 0; out_1717307412409030834[116] = 0; out_1717307412409030834[117] = 0; out_1717307412409030834[118] = 0; out_1717307412409030834[119] = 0; out_1717307412409030834[120] = 0; out_1717307412409030834[121] = 0; out_1717307412409030834[122] = 0; out_1717307412409030834[123] = 0; out_1717307412409030834[124] = 0; out_1717307412409030834[125] = 0; out_1717307412409030834[126] = 0; out_1717307412409030834[127] = 0; out_1717307412409030834[128] = 0; out_1717307412409030834[129] = 0.5*state[5]; out_1717307412409030834[130] = -0.5*state[4]; out_1717307412409030834[131] = 0.5*state[3]; out_1717307412409030834[132] = 0; out_1717307412409030834[133] = 0; out_1717307412409030834[134] = 0; out_1717307412409030834[135] = 0; out_1717307412409030834[136] = 0; out_1717307412409030834[137] = 0; out_1717307412409030834[138] = 0; out_1717307412409030834[139] = 0; out_1717307412409030834[140] = 0; out_1717307412409030834[141] = 0; out_1717307412409030834[142] = 0; out_1717307412409030834[143] = 0; out_1717307412409030834[144] = 0; out_1717307412409030834[145] = 0; out_1717307412409030834[146] = 0; out_1717307412409030834[147] = 0; out_1717307412409030834[148] = 0; out_1717307412409030834[149] = 0; out_1717307412409030834[150] = 0; out_1717307412409030834[151] = 0; out_1717307412409030834[152] = 0; out_1717307412409030834[153] = 1.0; out_1717307412409030834[154] = 0; out_1717307412409030834[155] = 0; out_1717307412409030834[156] = 0; out_1717307412409030834[157] = 0; out_1717307412409030834[158] = 0; out_1717307412409030834[159] = 0; out_1717307412409030834[160] = 0; out_1717307412409030834[161] = 0; out_1717307412409030834[162] = 0; out_1717307412409030834[163] = 0; out_1717307412409030834[164] = 0; out_1717307412409030834[165] = 0; out_1717307412409030834[166] = 0; out_1717307412409030834[167] = 0; out_1717307412409030834[168] = 0; out_1717307412409030834[169] = 0; out_1717307412409030834[170] = 0; out_1717307412409030834[171] = 0; out_1717307412409030834[172] = 0; out_1717307412409030834[173] = 0; out_1717307412409030834[174] = 0; out_1717307412409030834[175] = 1.0; out_1717307412409030834[176] = 0; out_1717307412409030834[177] = 0; out_1717307412409030834[178] = 0; out_1717307412409030834[179] = 0; out_1717307412409030834[180] = 0; out_1717307412409030834[181] = 0; out_1717307412409030834[182] = 0; out_1717307412409030834[183] = 0; out_1717307412409030834[184] = 0; out_1717307412409030834[185] = 0; out_1717307412409030834[186] = 0; out_1717307412409030834[187] = 0; out_1717307412409030834[188] = 0; out_1717307412409030834[189] = 0; out_1717307412409030834[190] = 0; out_1717307412409030834[191] = 0; out_1717307412409030834[192] = 0; out_1717307412409030834[193] = 0; out_1717307412409030834[194] = 0; out_1717307412409030834[195] = 0; out_1717307412409030834[196] = 0; out_1717307412409030834[197] = 1.0; out_1717307412409030834[198] = 0; out_1717307412409030834[199] = 0; out_1717307412409030834[200] = 0; out_1717307412409030834[201] = 0; out_1717307412409030834[202] = 0; out_1717307412409030834[203] = 0; out_1717307412409030834[204] = 0; out_1717307412409030834[205] = 0; out_1717307412409030834[206] = 0; out_1717307412409030834[207] = 0; out_1717307412409030834[208] = 0; out_1717307412409030834[209] = 0; out_1717307412409030834[210] = 0; out_1717307412409030834[211] = 0; out_1717307412409030834[212] = 0; out_1717307412409030834[213] = 0; out_1717307412409030834[214] = 0; out_1717307412409030834[215] = 0; out_1717307412409030834[216] = 0; out_1717307412409030834[217] = 0; out_1717307412409030834[218] = 0; out_1717307412409030834[219] = 1.0; out_1717307412409030834[220] = 0; out_1717307412409030834[221] = 0; out_1717307412409030834[222] = 0; out_1717307412409030834[223] = 0; out_1717307412409030834[224] = 0; out_1717307412409030834[225] = 0; out_1717307412409030834[226] = 0; out_1717307412409030834[227] = 0; out_1717307412409030834[228] = 0; out_1717307412409030834[229] = 0; out_1717307412409030834[230] = 0; out_1717307412409030834[231] = 0; out_1717307412409030834[232] = 0; out_1717307412409030834[233] = 0; out_1717307412409030834[234] = 0; out_1717307412409030834[235] = 0; out_1717307412409030834[236] = 0; out_1717307412409030834[237] = 0; out_1717307412409030834[238] = 0; out_1717307412409030834[239] = 0; out_1717307412409030834[240] = 0; out_1717307412409030834[241] = 1.0; out_1717307412409030834[242] = 0; out_1717307412409030834[243] = 0; out_1717307412409030834[244] = 0; out_1717307412409030834[245] = 0; out_1717307412409030834[246] = 0; out_1717307412409030834[247] = 0; out_1717307412409030834[248] = 0; out_1717307412409030834[249] = 0; out_1717307412409030834[250] = 0; out_1717307412409030834[251] = 0; out_1717307412409030834[252] = 0; out_1717307412409030834[253] = 0; out_1717307412409030834[254] = 0; out_1717307412409030834[255] = 0; out_1717307412409030834[256] = 0; out_1717307412409030834[257] = 0; out_1717307412409030834[258] = 0; out_1717307412409030834[259] = 0; out_1717307412409030834[260] = 0; out_1717307412409030834[261] = 0; out_1717307412409030834[262] = 0; out_1717307412409030834[263] = 1.0; out_1717307412409030834[264] = 0; out_1717307412409030834[265] = 0; out_1717307412409030834[266] = 0; out_1717307412409030834[267] = 0; out_1717307412409030834[268] = 0; out_1717307412409030834[269] = 0; out_1717307412409030834[270] = 0; out_1717307412409030834[271] = 0; out_1717307412409030834[272] = 0; out_1717307412409030834[273] = 0; out_1717307412409030834[274] = 0; out_1717307412409030834[275] = 0; out_1717307412409030834[276] = 0; out_1717307412409030834[277] = 0; out_1717307412409030834[278] = 0; out_1717307412409030834[279] = 0; out_1717307412409030834[280] = 0; out_1717307412409030834[281] = 0; out_1717307412409030834[282] = 0; out_1717307412409030834[283] = 0; out_1717307412409030834[284] = 0; out_1717307412409030834[285] = 1.0; out_1717307412409030834[286] = 0; out_1717307412409030834[287] = 0; out_1717307412409030834[288] = 0; out_1717307412409030834[289] = 0; out_1717307412409030834[290] = 0; out_1717307412409030834[291] = 0; out_1717307412409030834[292] = 0; out_1717307412409030834[293] = 0; out_1717307412409030834[294] = 0; out_1717307412409030834[295] = 0; out_1717307412409030834[296] = 0; out_1717307412409030834[297] = 0; out_1717307412409030834[298] = 0; out_1717307412409030834[299] = 0; out_1717307412409030834[300] = 0; out_1717307412409030834[301] = 0; out_1717307412409030834[302] = 0; out_1717307412409030834[303] = 0; out_1717307412409030834[304] = 0; out_1717307412409030834[305] = 0; out_1717307412409030834[306] = 0; out_1717307412409030834[307] = 1.0; out_1717307412409030834[308] = 0; out_1717307412409030834[309] = 0; out_1717307412409030834[310] = 0; out_1717307412409030834[311] = 0; out_1717307412409030834[312] = 0; out_1717307412409030834[313] = 0; out_1717307412409030834[314] = 0; out_1717307412409030834[315] = 0; out_1717307412409030834[316] = 0; out_1717307412409030834[317] = 0; out_1717307412409030834[318] = 0; out_1717307412409030834[319] = 0; out_1717307412409030834[320] = 0; out_1717307412409030834[321] = 0; out_1717307412409030834[322] = 0; out_1717307412409030834[323] = 0; out_1717307412409030834[324] = 0; out_1717307412409030834[325] = 0; out_1717307412409030834[326] = 0; out_1717307412409030834[327] = 0; out_1717307412409030834[328] = 0; out_1717307412409030834[329] = 1.0; out_1717307412409030834[330] = 0; out_1717307412409030834[331] = 0; out_1717307412409030834[332] = 0; out_1717307412409030834[333] = 0; out_1717307412409030834[334] = 0; out_1717307412409030834[335] = 0; out_1717307412409030834[336] = 0; out_1717307412409030834[337] = 0; out_1717307412409030834[338] = 0; out_1717307412409030834[339] = 0; out_1717307412409030834[340] = 0; out_1717307412409030834[341] = 0; out_1717307412409030834[342] = 0; out_1717307412409030834[343] = 0; out_1717307412409030834[344] = 0; out_1717307412409030834[345] = 0; out_1717307412409030834[346] = 0; out_1717307412409030834[347] = 0; out_1717307412409030834[348] = 0; out_1717307412409030834[349] = 0; out_1717307412409030834[350] = 0; out_1717307412409030834[351] = 1.0; out_1717307412409030834[352] = 0; out_1717307412409030834[353] = 0; out_1717307412409030834[354] = 0; out_1717307412409030834[355] = 0; out_1717307412409030834[356] = 0; out_1717307412409030834[357] = 0; out_1717307412409030834[358] = 0; out_1717307412409030834[359] = 0; out_1717307412409030834[360] = 0; out_1717307412409030834[361] = 0; out_1717307412409030834[362] = 0; out_1717307412409030834[363] = 0; out_1717307412409030834[364] = 0; out_1717307412409030834[365] = 0; out_1717307412409030834[366] = 0; out_1717307412409030834[367] = 0; out_1717307412409030834[368] = 0; out_1717307412409030834[369] = 0; out_1717307412409030834[370] = 0; out_1717307412409030834[371] = 0; out_1717307412409030834[372] = 0; out_1717307412409030834[373] = 1.0; out_1717307412409030834[374] = 0; out_1717307412409030834[375] = 0; out_1717307412409030834[376] = 0; out_1717307412409030834[377] = 0; out_1717307412409030834[378] = 0; out_1717307412409030834[379] = 0; out_1717307412409030834[380] = 0; out_1717307412409030834[381] = 0; out_1717307412409030834[382] = 0; out_1717307412409030834[383] = 0; out_1717307412409030834[384] = 0; out_1717307412409030834[385] = 0; out_1717307412409030834[386] = 0; out_1717307412409030834[387] = 0; out_1717307412409030834[388] = 0; out_1717307412409030834[389] = 0; out_1717307412409030834[390] = 0; out_1717307412409030834[391] = 0; out_1717307412409030834[392] = 0; out_1717307412409030834[393] = 0; out_1717307412409030834[394] = 0; out_1717307412409030834[395] = 1.0; out_1717307412409030834[396] = 0; out_1717307412409030834[397] = 0; out_1717307412409030834[398] = 0; out_1717307412409030834[399] = 0; out_1717307412409030834[400] = 0; out_1717307412409030834[401] = 0; out_1717307412409030834[402] = 0; out_1717307412409030834[403] = 0; out_1717307412409030834[404] = 0; out_1717307412409030834[405] = 0; out_1717307412409030834[406] = 0; out_1717307412409030834[407] = 0; out_1717307412409030834[408] = 0; out_1717307412409030834[409] = 0; out_1717307412409030834[410] = 0; out_1717307412409030834[411] = 0; out_1717307412409030834[412] = 0; out_1717307412409030834[413] = 0; out_1717307412409030834[414] = 0; out_1717307412409030834[415] = 0; out_1717307412409030834[416] = 0; out_1717307412409030834[417] = 1.0; out_1717307412409030834[418] = 0; out_1717307412409030834[419] = 0; out_1717307412409030834[420] = 0; out_1717307412409030834[421] = 0; out_1717307412409030834[422] = 0; out_1717307412409030834[423] = 0; out_1717307412409030834[424] = 0; out_1717307412409030834[425] = 0; out_1717307412409030834[426] = 0; out_1717307412409030834[427] = 0; out_1717307412409030834[428] = 0; out_1717307412409030834[429] = 0; out_1717307412409030834[430] = 0; out_1717307412409030834[431] = 0; out_1717307412409030834[432] = 0; out_1717307412409030834[433] = 0; out_1717307412409030834[434] = 0; out_1717307412409030834[435] = 0; out_1717307412409030834[436] = 0; out_1717307412409030834[437] = 0; out_1717307412409030834[438] = 0; out_1717307412409030834[439] = 1.0; out_1717307412409030834[440] = 0; out_1717307412409030834[441] = 0; out_1717307412409030834[442] = 0; out_1717307412409030834[443] = 0; out_1717307412409030834[444] = 0; out_1717307412409030834[445] = 0; out_1717307412409030834[446] = 0; out_1717307412409030834[447] = 0; out_1717307412409030834[448] = 0; out_1717307412409030834[449] = 0; out_1717307412409030834[450] = 0; out_1717307412409030834[451] = 0; out_1717307412409030834[452] = 0; out_1717307412409030834[453] = 0; out_1717307412409030834[454] = 0; out_1717307412409030834[455] = 0; out_1717307412409030834[456] = 0; out_1717307412409030834[457] = 0; out_1717307412409030834[458] = 0; out_1717307412409030834[459] = 0; out_1717307412409030834[460] = 0; out_1717307412409030834[461] = 1.0; } void f_fun(double *state, double dt, double *out_1245492105666153270) { out_1245492105666153270[0] = dt*state[7] + state[0]; out_1245492105666153270[1] = dt*state[8] + state[1]; out_1245492105666153270[2] = dt*state[9] + state[2]; out_1245492105666153270[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; out_1245492105666153270[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; out_1245492105666153270[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; out_1245492105666153270[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; out_1245492105666153270[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7]; out_1245492105666153270[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8]; out_1245492105666153270[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9]; out_1245492105666153270[10] = state[10]; out_1245492105666153270[11] = state[11]; out_1245492105666153270[12] = state[12]; out_1245492105666153270[13] = state[13]; out_1245492105666153270[14] = state[14]; out_1245492105666153270[15] = state[15]; out_1245492105666153270[16] = state[16]; out_1245492105666153270[17] = state[17]; out_1245492105666153270[18] = state[18]; out_1245492105666153270[19] = state[19]; out_1245492105666153270[20] = state[20]; out_1245492105666153270[21] = state[21]; } void F_fun(double *state, double dt, double *out_8230678422181646315) { out_8230678422181646315[0] = 1; out_8230678422181646315[1] = 0; out_8230678422181646315[2] = 0; out_8230678422181646315[3] = 0; out_8230678422181646315[4] = 0; out_8230678422181646315[5] = 0; out_8230678422181646315[6] = dt; out_8230678422181646315[7] = 0; out_8230678422181646315[8] = 0; out_8230678422181646315[9] = 0; out_8230678422181646315[10] = 0; out_8230678422181646315[11] = 0; out_8230678422181646315[12] = 0; out_8230678422181646315[13] = 0; out_8230678422181646315[14] = 0; out_8230678422181646315[15] = 0; out_8230678422181646315[16] = 0; out_8230678422181646315[17] = 0; out_8230678422181646315[18] = 0; out_8230678422181646315[19] = 0; out_8230678422181646315[20] = 0; out_8230678422181646315[21] = 0; out_8230678422181646315[22] = 1; out_8230678422181646315[23] = 0; out_8230678422181646315[24] = 0; out_8230678422181646315[25] = 0; out_8230678422181646315[26] = 0; out_8230678422181646315[27] = 0; out_8230678422181646315[28] = dt; out_8230678422181646315[29] = 0; out_8230678422181646315[30] = 0; out_8230678422181646315[31] = 0; out_8230678422181646315[32] = 0; out_8230678422181646315[33] = 0; out_8230678422181646315[34] = 0; out_8230678422181646315[35] = 0; out_8230678422181646315[36] = 0; out_8230678422181646315[37] = 0; out_8230678422181646315[38] = 0; out_8230678422181646315[39] = 0; out_8230678422181646315[40] = 0; out_8230678422181646315[41] = 0; out_8230678422181646315[42] = 0; out_8230678422181646315[43] = 0; out_8230678422181646315[44] = 1; out_8230678422181646315[45] = 0; out_8230678422181646315[46] = 0; out_8230678422181646315[47] = 0; out_8230678422181646315[48] = 0; out_8230678422181646315[49] = 0; out_8230678422181646315[50] = dt; out_8230678422181646315[51] = 0; out_8230678422181646315[52] = 0; out_8230678422181646315[53] = 0; out_8230678422181646315[54] = 0; out_8230678422181646315[55] = 0; out_8230678422181646315[56] = 0; out_8230678422181646315[57] = 0; out_8230678422181646315[58] = 0; out_8230678422181646315[59] = 0; out_8230678422181646315[60] = 0; out_8230678422181646315[61] = 0; out_8230678422181646315[62] = 0; out_8230678422181646315[63] = 0; out_8230678422181646315[64] = 0; out_8230678422181646315[65] = 0; out_8230678422181646315[66] = 1; out_8230678422181646315[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); out_8230678422181646315[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]); out_8230678422181646315[69] = 0; out_8230678422181646315[70] = 0; out_8230678422181646315[71] = 0; out_8230678422181646315[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); out_8230678422181646315[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); out_8230678422181646315[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); out_8230678422181646315[75] = 0; out_8230678422181646315[76] = 0; out_8230678422181646315[77] = 0; out_8230678422181646315[78] = 0; out_8230678422181646315[79] = 0; out_8230678422181646315[80] = 0; out_8230678422181646315[81] = 0; out_8230678422181646315[82] = 0; out_8230678422181646315[83] = 0; out_8230678422181646315[84] = 0; out_8230678422181646315[85] = 0; out_8230678422181646315[86] = 0; out_8230678422181646315[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); out_8230678422181646315[88] = 1; out_8230678422181646315[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]); out_8230678422181646315[90] = 0; out_8230678422181646315[91] = 0; out_8230678422181646315[92] = 0; out_8230678422181646315[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); out_8230678422181646315[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); out_8230678422181646315[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); out_8230678422181646315[96] = 0; out_8230678422181646315[97] = 0; out_8230678422181646315[98] = 0; out_8230678422181646315[99] = 0; out_8230678422181646315[100] = 0; out_8230678422181646315[101] = 0; out_8230678422181646315[102] = 0; out_8230678422181646315[103] = 0; out_8230678422181646315[104] = 0; out_8230678422181646315[105] = 0; out_8230678422181646315[106] = 0; out_8230678422181646315[107] = 0; out_8230678422181646315[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]); out_8230678422181646315[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]); out_8230678422181646315[110] = 1; out_8230678422181646315[111] = 0; out_8230678422181646315[112] = 0; out_8230678422181646315[113] = 0; out_8230678422181646315[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); out_8230678422181646315[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); out_8230678422181646315[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); out_8230678422181646315[117] = 0; out_8230678422181646315[118] = 0; out_8230678422181646315[119] = 0; out_8230678422181646315[120] = 0; out_8230678422181646315[121] = 0; out_8230678422181646315[122] = 0; out_8230678422181646315[123] = 0; out_8230678422181646315[124] = 0; out_8230678422181646315[125] = 0; out_8230678422181646315[126] = 0; out_8230678422181646315[127] = 0; out_8230678422181646315[128] = 0; out_8230678422181646315[129] = 0; out_8230678422181646315[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); out_8230678422181646315[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]); out_8230678422181646315[132] = 1; out_8230678422181646315[133] = 0; out_8230678422181646315[134] = 0; out_8230678422181646315[135] = 0; out_8230678422181646315[136] = 0; out_8230678422181646315[137] = 0; out_8230678422181646315[138] = 0; out_8230678422181646315[139] = 0; out_8230678422181646315[140] = 0; out_8230678422181646315[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); out_8230678422181646315[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); out_8230678422181646315[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); out_8230678422181646315[144] = 0; out_8230678422181646315[145] = 0; out_8230678422181646315[146] = 0; out_8230678422181646315[147] = 0; out_8230678422181646315[148] = 0; out_8230678422181646315[149] = 0; out_8230678422181646315[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); out_8230678422181646315[151] = 0; out_8230678422181646315[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]); out_8230678422181646315[153] = 0; out_8230678422181646315[154] = 1; out_8230678422181646315[155] = 0; out_8230678422181646315[156] = 0; out_8230678422181646315[157] = 0; out_8230678422181646315[158] = 0; out_8230678422181646315[159] = 0; out_8230678422181646315[160] = 0; out_8230678422181646315[161] = 0; out_8230678422181646315[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); out_8230678422181646315[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); out_8230678422181646315[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); out_8230678422181646315[165] = 0; out_8230678422181646315[166] = 0; out_8230678422181646315[167] = 0; out_8230678422181646315[168] = 0; out_8230678422181646315[169] = 0; out_8230678422181646315[170] = 0; out_8230678422181646315[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]); out_8230678422181646315[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]); out_8230678422181646315[173] = 0; out_8230678422181646315[174] = 0; out_8230678422181646315[175] = 0; out_8230678422181646315[176] = 1; out_8230678422181646315[177] = 0; out_8230678422181646315[178] = 0; out_8230678422181646315[179] = 0; out_8230678422181646315[180] = 0; out_8230678422181646315[181] = 0; out_8230678422181646315[182] = 0; out_8230678422181646315[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); out_8230678422181646315[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); out_8230678422181646315[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); out_8230678422181646315[186] = 0; out_8230678422181646315[187] = 0; out_8230678422181646315[188] = 0; out_8230678422181646315[189] = 0; out_8230678422181646315[190] = 0; out_8230678422181646315[191] = 0; out_8230678422181646315[192] = 0; out_8230678422181646315[193] = 0; out_8230678422181646315[194] = 0; out_8230678422181646315[195] = 0; out_8230678422181646315[196] = 0; out_8230678422181646315[197] = 0; out_8230678422181646315[198] = 1; out_8230678422181646315[199] = 0; out_8230678422181646315[200] = 0; out_8230678422181646315[201] = 0; out_8230678422181646315[202] = 0; out_8230678422181646315[203] = 0; out_8230678422181646315[204] = 0; out_8230678422181646315[205] = 0; out_8230678422181646315[206] = 0; out_8230678422181646315[207] = 0; out_8230678422181646315[208] = 0; out_8230678422181646315[209] = 0; out_8230678422181646315[210] = 0; out_8230678422181646315[211] = 0; out_8230678422181646315[212] = 0; out_8230678422181646315[213] = 0; out_8230678422181646315[214] = 0; out_8230678422181646315[215] = 0; out_8230678422181646315[216] = 0; out_8230678422181646315[217] = 0; out_8230678422181646315[218] = 0; out_8230678422181646315[219] = 0; out_8230678422181646315[220] = 1; out_8230678422181646315[221] = 0; out_8230678422181646315[222] = 0; out_8230678422181646315[223] = 0; out_8230678422181646315[224] = 0; out_8230678422181646315[225] = 0; out_8230678422181646315[226] = 0; out_8230678422181646315[227] = 0; out_8230678422181646315[228] = 0; out_8230678422181646315[229] = 0; out_8230678422181646315[230] = 0; out_8230678422181646315[231] = 0; out_8230678422181646315[232] = 0; out_8230678422181646315[233] = 0; out_8230678422181646315[234] = 0; out_8230678422181646315[235] = 0; out_8230678422181646315[236] = 0; out_8230678422181646315[237] = 0; out_8230678422181646315[238] = 0; out_8230678422181646315[239] = 0; out_8230678422181646315[240] = 0; out_8230678422181646315[241] = 0; out_8230678422181646315[242] = 1; out_8230678422181646315[243] = 0; out_8230678422181646315[244] = 0; out_8230678422181646315[245] = 0; out_8230678422181646315[246] = 0; out_8230678422181646315[247] = 0; out_8230678422181646315[248] = 0; out_8230678422181646315[249] = 0; out_8230678422181646315[250] = 0; out_8230678422181646315[251] = 0; out_8230678422181646315[252] = 0; out_8230678422181646315[253] = 0; out_8230678422181646315[254] = 0; out_8230678422181646315[255] = 0; out_8230678422181646315[256] = 0; out_8230678422181646315[257] = 0; out_8230678422181646315[258] = 0; out_8230678422181646315[259] = 0; out_8230678422181646315[260] = 0; out_8230678422181646315[261] = 0; out_8230678422181646315[262] = 0; out_8230678422181646315[263] = 0; out_8230678422181646315[264] = 1; out_8230678422181646315[265] = 0; out_8230678422181646315[266] = 0; out_8230678422181646315[267] = 0; out_8230678422181646315[268] = 0; out_8230678422181646315[269] = 0; out_8230678422181646315[270] = 0; out_8230678422181646315[271] = 0; out_8230678422181646315[272] = 0; out_8230678422181646315[273] = 0; out_8230678422181646315[274] = 0; out_8230678422181646315[275] = 0; out_8230678422181646315[276] = 0; out_8230678422181646315[277] = 0; out_8230678422181646315[278] = 0; out_8230678422181646315[279] = 0; out_8230678422181646315[280] = 0; out_8230678422181646315[281] = 0; out_8230678422181646315[282] = 0; out_8230678422181646315[283] = 0; out_8230678422181646315[284] = 0; out_8230678422181646315[285] = 0; out_8230678422181646315[286] = 1; out_8230678422181646315[287] = 0; out_8230678422181646315[288] = 0; out_8230678422181646315[289] = 0; out_8230678422181646315[290] = 0; out_8230678422181646315[291] = 0; out_8230678422181646315[292] = 0; out_8230678422181646315[293] = 0; out_8230678422181646315[294] = 0; out_8230678422181646315[295] = 0; out_8230678422181646315[296] = 0; out_8230678422181646315[297] = 0; out_8230678422181646315[298] = 0; out_8230678422181646315[299] = 0; out_8230678422181646315[300] = 0; out_8230678422181646315[301] = 0; out_8230678422181646315[302] = 0; out_8230678422181646315[303] = 0; out_8230678422181646315[304] = 0; out_8230678422181646315[305] = 0; out_8230678422181646315[306] = 0; out_8230678422181646315[307] = 0; out_8230678422181646315[308] = 1; out_8230678422181646315[309] = 0; out_8230678422181646315[310] = 0; out_8230678422181646315[311] = 0; out_8230678422181646315[312] = 0; out_8230678422181646315[313] = 0; out_8230678422181646315[314] = 0; out_8230678422181646315[315] = 0; out_8230678422181646315[316] = 0; out_8230678422181646315[317] = 0; out_8230678422181646315[318] = 0; out_8230678422181646315[319] = 0; out_8230678422181646315[320] = 0; out_8230678422181646315[321] = 0; out_8230678422181646315[322] = 0; out_8230678422181646315[323] = 0; out_8230678422181646315[324] = 0; out_8230678422181646315[325] = 0; out_8230678422181646315[326] = 0; out_8230678422181646315[327] = 0; out_8230678422181646315[328] = 0; out_8230678422181646315[329] = 0; out_8230678422181646315[330] = 1; out_8230678422181646315[331] = 0; out_8230678422181646315[332] = 0; out_8230678422181646315[333] = 0; out_8230678422181646315[334] = 0; out_8230678422181646315[335] = 0; out_8230678422181646315[336] = 0; out_8230678422181646315[337] = 0; out_8230678422181646315[338] = 0; out_8230678422181646315[339] = 0; out_8230678422181646315[340] = 0; out_8230678422181646315[341] = 0; out_8230678422181646315[342] = 0; out_8230678422181646315[343] = 0; out_8230678422181646315[344] = 0; out_8230678422181646315[345] = 0; out_8230678422181646315[346] = 0; out_8230678422181646315[347] = 0; out_8230678422181646315[348] = 0; out_8230678422181646315[349] = 0; out_8230678422181646315[350] = 0; out_8230678422181646315[351] = 0; out_8230678422181646315[352] = 1; out_8230678422181646315[353] = 0; out_8230678422181646315[354] = 0; out_8230678422181646315[355] = 0; out_8230678422181646315[356] = 0; out_8230678422181646315[357] = 0; out_8230678422181646315[358] = 0; out_8230678422181646315[359] = 0; out_8230678422181646315[360] = 0; out_8230678422181646315[361] = 0; out_8230678422181646315[362] = 0; out_8230678422181646315[363] = 0; out_8230678422181646315[364] = 0; out_8230678422181646315[365] = 0; out_8230678422181646315[366] = 0; out_8230678422181646315[367] = 0; out_8230678422181646315[368] = 0; out_8230678422181646315[369] = 0; out_8230678422181646315[370] = 0; out_8230678422181646315[371] = 0; out_8230678422181646315[372] = 0; out_8230678422181646315[373] = 0; out_8230678422181646315[374] = 1; out_8230678422181646315[375] = 0; out_8230678422181646315[376] = 0; out_8230678422181646315[377] = 0; out_8230678422181646315[378] = 0; out_8230678422181646315[379] = 0; out_8230678422181646315[380] = 0; out_8230678422181646315[381] = 0; out_8230678422181646315[382] = 0; out_8230678422181646315[383] = 0; out_8230678422181646315[384] = 0; out_8230678422181646315[385] = 0; out_8230678422181646315[386] = 0; out_8230678422181646315[387] = 0; out_8230678422181646315[388] = 0; out_8230678422181646315[389] = 0; out_8230678422181646315[390] = 0; out_8230678422181646315[391] = 0; out_8230678422181646315[392] = 0; out_8230678422181646315[393] = 0; out_8230678422181646315[394] = 0; out_8230678422181646315[395] = 0; out_8230678422181646315[396] = 1; out_8230678422181646315[397] = 0; out_8230678422181646315[398] = 0; out_8230678422181646315[399] = 0; out_8230678422181646315[400] = 0; out_8230678422181646315[401] = 0; out_8230678422181646315[402] = 0; out_8230678422181646315[403] = 0; out_8230678422181646315[404] = 0; out_8230678422181646315[405] = 0; out_8230678422181646315[406] = 0; out_8230678422181646315[407] = 0; out_8230678422181646315[408] = 0; out_8230678422181646315[409] = 0; out_8230678422181646315[410] = 0; out_8230678422181646315[411] = 0; out_8230678422181646315[412] = 0; out_8230678422181646315[413] = 0; out_8230678422181646315[414] = 0; out_8230678422181646315[415] = 0; out_8230678422181646315[416] = 0; out_8230678422181646315[417] = 0; out_8230678422181646315[418] = 1; out_8230678422181646315[419] = 0; out_8230678422181646315[420] = 0; out_8230678422181646315[421] = 0; out_8230678422181646315[422] = 0; out_8230678422181646315[423] = 0; out_8230678422181646315[424] = 0; out_8230678422181646315[425] = 0; out_8230678422181646315[426] = 0; out_8230678422181646315[427] = 0; out_8230678422181646315[428] = 0; out_8230678422181646315[429] = 0; out_8230678422181646315[430] = 0; out_8230678422181646315[431] = 0; out_8230678422181646315[432] = 0; out_8230678422181646315[433] = 0; out_8230678422181646315[434] = 0; out_8230678422181646315[435] = 0; out_8230678422181646315[436] = 0; out_8230678422181646315[437] = 0; out_8230678422181646315[438] = 0; out_8230678422181646315[439] = 0; out_8230678422181646315[440] = 1; } void h_4(double *state, double *unused, double *out_6969953109958175532) { out_6969953109958175532[0] = state[10] + state[13]; out_6969953109958175532[1] = state[11] + state[14]; out_6969953109958175532[2] = state[12] + state[15]; } void H_4(double *state, double *unused, double *out_9068042219318072479) { out_9068042219318072479[0] = 0; out_9068042219318072479[1] = 0; out_9068042219318072479[2] = 0; out_9068042219318072479[3] = 0; out_9068042219318072479[4] = 0; out_9068042219318072479[5] = 0; out_9068042219318072479[6] = 0; out_9068042219318072479[7] = 0; out_9068042219318072479[8] = 0; out_9068042219318072479[9] = 0; out_9068042219318072479[10] = 1; out_9068042219318072479[11] = 0; out_9068042219318072479[12] = 0; out_9068042219318072479[13] = 1; out_9068042219318072479[14] = 0; out_9068042219318072479[15] = 0; out_9068042219318072479[16] = 0; out_9068042219318072479[17] = 0; out_9068042219318072479[18] = 0; out_9068042219318072479[19] = 0; out_9068042219318072479[20] = 0; out_9068042219318072479[21] = 0; out_9068042219318072479[22] = 0; out_9068042219318072479[23] = 0; out_9068042219318072479[24] = 0; out_9068042219318072479[25] = 0; out_9068042219318072479[26] = 0; out_9068042219318072479[27] = 0; out_9068042219318072479[28] = 0; out_9068042219318072479[29] = 0; out_9068042219318072479[30] = 0; out_9068042219318072479[31] = 0; out_9068042219318072479[32] = 0; out_9068042219318072479[33] = 1; out_9068042219318072479[34] = 0; out_9068042219318072479[35] = 0; out_9068042219318072479[36] = 1; out_9068042219318072479[37] = 0; out_9068042219318072479[38] = 0; out_9068042219318072479[39] = 0; out_9068042219318072479[40] = 0; out_9068042219318072479[41] = 0; out_9068042219318072479[42] = 0; out_9068042219318072479[43] = 0; out_9068042219318072479[44] = 0; out_9068042219318072479[45] = 0; out_9068042219318072479[46] = 0; out_9068042219318072479[47] = 0; out_9068042219318072479[48] = 0; out_9068042219318072479[49] = 0; out_9068042219318072479[50] = 0; out_9068042219318072479[51] = 0; out_9068042219318072479[52] = 0; out_9068042219318072479[53] = 0; out_9068042219318072479[54] = 0; out_9068042219318072479[55] = 0; out_9068042219318072479[56] = 1; out_9068042219318072479[57] = 0; out_9068042219318072479[58] = 0; out_9068042219318072479[59] = 1; out_9068042219318072479[60] = 0; out_9068042219318072479[61] = 0; out_9068042219318072479[62] = 0; out_9068042219318072479[63] = 0; out_9068042219318072479[64] = 0; out_9068042219318072479[65] = 0; } void h_9(double *state, double *unused, double *out_4316680648345213953) { out_4316680648345213953[0] = state[10]; out_4316680648345213953[1] = state[11]; out_4316680648345213953[2] = state[12]; } void H_9(double *state, double *unused, double *out_8826852572688481834) { out_8826852572688481834[0] = 0; out_8826852572688481834[1] = 0; out_8826852572688481834[2] = 0; out_8826852572688481834[3] = 0; out_8826852572688481834[4] = 0; out_8826852572688481834[5] = 0; out_8826852572688481834[6] = 0; out_8826852572688481834[7] = 0; out_8826852572688481834[8] = 0; out_8826852572688481834[9] = 0; out_8826852572688481834[10] = 1; out_8826852572688481834[11] = 0; out_8826852572688481834[12] = 0; out_8826852572688481834[13] = 0; out_8826852572688481834[14] = 0; out_8826852572688481834[15] = 0; out_8826852572688481834[16] = 0; out_8826852572688481834[17] = 0; out_8826852572688481834[18] = 0; out_8826852572688481834[19] = 0; out_8826852572688481834[20] = 0; out_8826852572688481834[21] = 0; out_8826852572688481834[22] = 0; out_8826852572688481834[23] = 0; out_8826852572688481834[24] = 0; out_8826852572688481834[25] = 0; out_8826852572688481834[26] = 0; out_8826852572688481834[27] = 0; out_8826852572688481834[28] = 0; out_8826852572688481834[29] = 0; out_8826852572688481834[30] = 0; out_8826852572688481834[31] = 0; out_8826852572688481834[32] = 0; out_8826852572688481834[33] = 1; out_8826852572688481834[34] = 0; out_8826852572688481834[35] = 0; out_8826852572688481834[36] = 0; out_8826852572688481834[37] = 0; out_8826852572688481834[38] = 0; out_8826852572688481834[39] = 0; out_8826852572688481834[40] = 0; out_8826852572688481834[41] = 0; out_8826852572688481834[42] = 0; out_8826852572688481834[43] = 0; out_8826852572688481834[44] = 0; out_8826852572688481834[45] = 0; out_8826852572688481834[46] = 0; out_8826852572688481834[47] = 0; out_8826852572688481834[48] = 0; out_8826852572688481834[49] = 0; out_8826852572688481834[50] = 0; out_8826852572688481834[51] = 0; out_8826852572688481834[52] = 0; out_8826852572688481834[53] = 0; out_8826852572688481834[54] = 0; out_8826852572688481834[55] = 0; out_8826852572688481834[56] = 1; out_8826852572688481834[57] = 0; out_8826852572688481834[58] = 0; out_8826852572688481834[59] = 0; out_8826852572688481834[60] = 0; out_8826852572688481834[61] = 0; out_8826852572688481834[62] = 0; out_8826852572688481834[63] = 0; out_8826852572688481834[64] = 0; out_8826852572688481834[65] = 0; } void h_10(double *state, double *unused, double *out_3010972192253664289) { out_3010972192253664289[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19]; out_3010972192253664289[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20]; out_3010972192253664289[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21]; } void H_10(double *state, double *unused, double *out_5530846044175782832) { out_5530846044175782832[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); out_5530846044175782832[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; out_5530846044175782832[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2]; out_5530846044175782832[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; out_5530846044175782832[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; out_5530846044175782832[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; out_5530846044175782832[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; out_5530846044175782832[7] = 0; out_5530846044175782832[8] = 0; out_5530846044175782832[9] = 0; out_5530846044175782832[10] = 0; out_5530846044175782832[11] = 0; out_5530846044175782832[12] = 0; out_5530846044175782832[13] = 0; out_5530846044175782832[14] = 0; out_5530846044175782832[15] = 0; out_5530846044175782832[16] = 1; out_5530846044175782832[17] = 0; out_5530846044175782832[18] = 0; out_5530846044175782832[19] = 1; out_5530846044175782832[20] = 0; out_5530846044175782832[21] = 0; out_5530846044175782832[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; out_5530846044175782832[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); out_5530846044175782832[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2]; out_5530846044175782832[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; out_5530846044175782832[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; out_5530846044175782832[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; out_5530846044175782832[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; out_5530846044175782832[29] = 0; out_5530846044175782832[30] = 0; out_5530846044175782832[31] = 0; out_5530846044175782832[32] = 0; out_5530846044175782832[33] = 0; out_5530846044175782832[34] = 0; out_5530846044175782832[35] = 0; out_5530846044175782832[36] = 0; out_5530846044175782832[37] = 0; out_5530846044175782832[38] = 0; out_5530846044175782832[39] = 1; out_5530846044175782832[40] = 0; out_5530846044175782832[41] = 0; out_5530846044175782832[42] = 1; out_5530846044175782832[43] = 0; out_5530846044175782832[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2]; out_5530846044175782832[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2]; out_5530846044175782832[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); out_5530846044175782832[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; out_5530846044175782832[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; out_5530846044175782832[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; out_5530846044175782832[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; out_5530846044175782832[51] = 0; out_5530846044175782832[52] = 0; out_5530846044175782832[53] = 0; out_5530846044175782832[54] = 0; out_5530846044175782832[55] = 0; out_5530846044175782832[56] = 0; out_5530846044175782832[57] = 0; out_5530846044175782832[58] = 0; out_5530846044175782832[59] = 0; out_5530846044175782832[60] = 0; out_5530846044175782832[61] = 0; out_5530846044175782832[62] = 1; out_5530846044175782832[63] = 0; out_5530846044175782832[64] = 0; out_5530846044175782832[65] = 1; } void h_12(double *state, double *unused, double *out_2575133727752322113) { out_2575133727752322113[0] = state[0]; out_2575133727752322113[1] = state[1]; out_2575133727752322113[2] = state[2]; } void H_12(double *state, double *unused, double *out_8446943194270478812) { out_8446943194270478812[0] = 1; out_8446943194270478812[1] = 0; out_8446943194270478812[2] = 0; out_8446943194270478812[3] = 0; out_8446943194270478812[4] = 0; out_8446943194270478812[5] = 0; out_8446943194270478812[6] = 0; out_8446943194270478812[7] = 0; out_8446943194270478812[8] = 0; out_8446943194270478812[9] = 0; out_8446943194270478812[10] = 0; out_8446943194270478812[11] = 0; out_8446943194270478812[12] = 0; out_8446943194270478812[13] = 0; out_8446943194270478812[14] = 0; out_8446943194270478812[15] = 0; out_8446943194270478812[16] = 0; out_8446943194270478812[17] = 0; out_8446943194270478812[18] = 0; out_8446943194270478812[19] = 0; out_8446943194270478812[20] = 0; out_8446943194270478812[21] = 0; out_8446943194270478812[22] = 0; out_8446943194270478812[23] = 1; out_8446943194270478812[24] = 0; out_8446943194270478812[25] = 0; out_8446943194270478812[26] = 0; out_8446943194270478812[27] = 0; out_8446943194270478812[28] = 0; out_8446943194270478812[29] = 0; out_8446943194270478812[30] = 0; out_8446943194270478812[31] = 0; out_8446943194270478812[32] = 0; out_8446943194270478812[33] = 0; out_8446943194270478812[34] = 0; out_8446943194270478812[35] = 0; out_8446943194270478812[36] = 0; out_8446943194270478812[37] = 0; out_8446943194270478812[38] = 0; out_8446943194270478812[39] = 0; out_8446943194270478812[40] = 0; out_8446943194270478812[41] = 0; out_8446943194270478812[42] = 0; out_8446943194270478812[43] = 0; out_8446943194270478812[44] = 0; out_8446943194270478812[45] = 0; out_8446943194270478812[46] = 1; out_8446943194270478812[47] = 0; out_8446943194270478812[48] = 0; out_8446943194270478812[49] = 0; out_8446943194270478812[50] = 0; out_8446943194270478812[51] = 0; out_8446943194270478812[52] = 0; out_8446943194270478812[53] = 0; out_8446943194270478812[54] = 0; out_8446943194270478812[55] = 0; out_8446943194270478812[56] = 0; out_8446943194270478812[57] = 0; out_8446943194270478812[58] = 0; out_8446943194270478812[59] = 0; out_8446943194270478812[60] = 0; out_8446943194270478812[61] = 0; out_8446943194270478812[62] = 0; out_8446943194270478812[63] = 0; out_8446943194270478812[64] = 0; out_8446943194270478812[65] = 0; } void h_35(double *state, double *unused, double *out_6925920790079934026) { out_6925920790079934026[0] = state[7]; out_6925920790079934026[1] = state[8]; out_6925920790079934026[2] = state[9]; } void H_35(double *state, double *unused, double *out_5701380161945465103) { out_5701380161945465103[0] = 0; out_5701380161945465103[1] = 0; out_5701380161945465103[2] = 0; out_5701380161945465103[3] = 0; out_5701380161945465103[4] = 0; out_5701380161945465103[5] = 0; out_5701380161945465103[6] = 0; out_5701380161945465103[7] = 1; out_5701380161945465103[8] = 0; out_5701380161945465103[9] = 0; out_5701380161945465103[10] = 0; out_5701380161945465103[11] = 0; out_5701380161945465103[12] = 0; out_5701380161945465103[13] = 0; out_5701380161945465103[14] = 0; out_5701380161945465103[15] = 0; out_5701380161945465103[16] = 0; out_5701380161945465103[17] = 0; out_5701380161945465103[18] = 0; out_5701380161945465103[19] = 0; out_5701380161945465103[20] = 0; out_5701380161945465103[21] = 0; out_5701380161945465103[22] = 0; out_5701380161945465103[23] = 0; out_5701380161945465103[24] = 0; out_5701380161945465103[25] = 0; out_5701380161945465103[26] = 0; out_5701380161945465103[27] = 0; out_5701380161945465103[28] = 0; out_5701380161945465103[29] = 0; out_5701380161945465103[30] = 1; out_5701380161945465103[31] = 0; out_5701380161945465103[32] = 0; out_5701380161945465103[33] = 0; out_5701380161945465103[34] = 0; out_5701380161945465103[35] = 0; out_5701380161945465103[36] = 0; out_5701380161945465103[37] = 0; out_5701380161945465103[38] = 0; out_5701380161945465103[39] = 0; out_5701380161945465103[40] = 0; out_5701380161945465103[41] = 0; out_5701380161945465103[42] = 0; out_5701380161945465103[43] = 0; out_5701380161945465103[44] = 0; out_5701380161945465103[45] = 0; out_5701380161945465103[46] = 0; out_5701380161945465103[47] = 0; out_5701380161945465103[48] = 0; out_5701380161945465103[49] = 0; out_5701380161945465103[50] = 0; out_5701380161945465103[51] = 0; out_5701380161945465103[52] = 0; out_5701380161945465103[53] = 1; out_5701380161945465103[54] = 0; out_5701380161945465103[55] = 0; out_5701380161945465103[56] = 0; out_5701380161945465103[57] = 0; out_5701380161945465103[58] = 0; out_5701380161945465103[59] = 0; out_5701380161945465103[60] = 0; out_5701380161945465103[61] = 0; out_5701380161945465103[62] = 0; out_5701380161945465103[63] = 0; out_5701380161945465103[64] = 0; out_5701380161945465103[65] = 0; } void h_32(double *state, double *unused, double *out_4102478073145767586) { out_4102478073145767586[0] = state[3]; out_4102478073145767586[1] = state[4]; out_4102478073145767586[2] = state[5]; out_4102478073145767586[3] = state[6]; } void H_32(double *state, double *unused, double *out_2153535821958306374) { out_2153535821958306374[0] = 0; out_2153535821958306374[1] = 0; out_2153535821958306374[2] = 0; out_2153535821958306374[3] = 1; out_2153535821958306374[4] = 0; out_2153535821958306374[5] = 0; out_2153535821958306374[6] = 0; out_2153535821958306374[7] = 0; out_2153535821958306374[8] = 0; out_2153535821958306374[9] = 0; out_2153535821958306374[10] = 0; out_2153535821958306374[11] = 0; out_2153535821958306374[12] = 0; out_2153535821958306374[13] = 0; out_2153535821958306374[14] = 0; out_2153535821958306374[15] = 0; out_2153535821958306374[16] = 0; out_2153535821958306374[17] = 0; out_2153535821958306374[18] = 0; out_2153535821958306374[19] = 0; out_2153535821958306374[20] = 0; out_2153535821958306374[21] = 0; out_2153535821958306374[22] = 0; out_2153535821958306374[23] = 0; out_2153535821958306374[24] = 0; out_2153535821958306374[25] = 0; out_2153535821958306374[26] = 1; out_2153535821958306374[27] = 0; out_2153535821958306374[28] = 0; out_2153535821958306374[29] = 0; out_2153535821958306374[30] = 0; out_2153535821958306374[31] = 0; out_2153535821958306374[32] = 0; out_2153535821958306374[33] = 0; out_2153535821958306374[34] = 0; out_2153535821958306374[35] = 0; out_2153535821958306374[36] = 0; out_2153535821958306374[37] = 0; out_2153535821958306374[38] = 0; out_2153535821958306374[39] = 0; out_2153535821958306374[40] = 0; out_2153535821958306374[41] = 0; out_2153535821958306374[42] = 0; out_2153535821958306374[43] = 0; out_2153535821958306374[44] = 0; out_2153535821958306374[45] = 0; out_2153535821958306374[46] = 0; out_2153535821958306374[47] = 0; out_2153535821958306374[48] = 0; out_2153535821958306374[49] = 1; out_2153535821958306374[50] = 0; out_2153535821958306374[51] = 0; out_2153535821958306374[52] = 0; out_2153535821958306374[53] = 0; out_2153535821958306374[54] = 0; out_2153535821958306374[55] = 0; out_2153535821958306374[56] = 0; out_2153535821958306374[57] = 0; out_2153535821958306374[58] = 0; out_2153535821958306374[59] = 0; out_2153535821958306374[60] = 0; out_2153535821958306374[61] = 0; out_2153535821958306374[62] = 0; out_2153535821958306374[63] = 0; out_2153535821958306374[64] = 0; out_2153535821958306374[65] = 0; out_2153535821958306374[66] = 0; out_2153535821958306374[67] = 0; out_2153535821958306374[68] = 0; out_2153535821958306374[69] = 0; out_2153535821958306374[70] = 0; out_2153535821958306374[71] = 0; out_2153535821958306374[72] = 1; out_2153535821958306374[73] = 0; out_2153535821958306374[74] = 0; out_2153535821958306374[75] = 0; out_2153535821958306374[76] = 0; out_2153535821958306374[77] = 0; out_2153535821958306374[78] = 0; out_2153535821958306374[79] = 0; out_2153535821958306374[80] = 0; out_2153535821958306374[81] = 0; out_2153535821958306374[82] = 0; out_2153535821958306374[83] = 0; out_2153535821958306374[84] = 0; out_2153535821958306374[85] = 0; out_2153535821958306374[86] = 0; out_2153535821958306374[87] = 0; } void h_13(double *state, double *unused, double *out_8720436796679792501) { out_8720436796679792501[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7]; out_8720436796679792501[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8]; out_8720436796679792501[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9]; } void H_13(double *state, double *unused, double *out_2669095838760402568) { out_2669095838760402568[0] = 0; out_2669095838760402568[1] = 0; out_2669095838760402568[2] = 0; out_2669095838760402568[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; out_2669095838760402568[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_2669095838760402568[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; out_2669095838760402568[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; out_2669095838760402568[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); out_2669095838760402568[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; out_2669095838760402568[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; out_2669095838760402568[10] = 0; out_2669095838760402568[11] = 0; out_2669095838760402568[12] = 0; out_2669095838760402568[13] = 0; out_2669095838760402568[14] = 0; out_2669095838760402568[15] = 0; out_2669095838760402568[16] = 0; out_2669095838760402568[17] = 0; out_2669095838760402568[18] = 0; out_2669095838760402568[19] = 0; out_2669095838760402568[20] = 0; out_2669095838760402568[21] = 0; out_2669095838760402568[22] = 0; out_2669095838760402568[23] = 0; out_2669095838760402568[24] = 0; out_2669095838760402568[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; out_2669095838760402568[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; out_2669095838760402568[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_2669095838760402568[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; out_2669095838760402568[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; out_2669095838760402568[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); out_2669095838760402568[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; out_2669095838760402568[32] = 0; out_2669095838760402568[33] = 0; out_2669095838760402568[34] = 0; out_2669095838760402568[35] = 0; out_2669095838760402568[36] = 0; out_2669095838760402568[37] = 0; out_2669095838760402568[38] = 0; out_2669095838760402568[39] = 0; out_2669095838760402568[40] = 0; out_2669095838760402568[41] = 0; out_2669095838760402568[42] = 0; out_2669095838760402568[43] = 0; out_2669095838760402568[44] = 0; out_2669095838760402568[45] = 0; out_2669095838760402568[46] = 0; out_2669095838760402568[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; out_2669095838760402568[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; out_2669095838760402568[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; out_2669095838760402568[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_2669095838760402568[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; out_2669095838760402568[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; out_2669095838760402568[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); out_2669095838760402568[54] = 0; out_2669095838760402568[55] = 0; out_2669095838760402568[56] = 0; out_2669095838760402568[57] = 0; out_2669095838760402568[58] = 0; out_2669095838760402568[59] = 0; out_2669095838760402568[60] = 0; out_2669095838760402568[61] = 0; out_2669095838760402568[62] = 0; out_2669095838760402568[63] = 0; out_2669095838760402568[64] = 0; out_2669095838760402568[65] = 0; } void h_14(double *state, double *unused, double *out_4316680648345213953) { out_4316680648345213953[0] = state[10]; out_4316680648345213953[1] = state[11]; out_4316680648345213953[2] = state[12]; } void H_14(double *state, double *unused, double *out_8826852572688481834) { out_8826852572688481834[0] = 0; out_8826852572688481834[1] = 0; out_8826852572688481834[2] = 0; out_8826852572688481834[3] = 0; out_8826852572688481834[4] = 0; out_8826852572688481834[5] = 0; out_8826852572688481834[6] = 0; out_8826852572688481834[7] = 0; out_8826852572688481834[8] = 0; out_8826852572688481834[9] = 0; out_8826852572688481834[10] = 1; out_8826852572688481834[11] = 0; out_8826852572688481834[12] = 0; out_8826852572688481834[13] = 0; out_8826852572688481834[14] = 0; out_8826852572688481834[15] = 0; out_8826852572688481834[16] = 0; out_8826852572688481834[17] = 0; out_8826852572688481834[18] = 0; out_8826852572688481834[19] = 0; out_8826852572688481834[20] = 0; out_8826852572688481834[21] = 0; out_8826852572688481834[22] = 0; out_8826852572688481834[23] = 0; out_8826852572688481834[24] = 0; out_8826852572688481834[25] = 0; out_8826852572688481834[26] = 0; out_8826852572688481834[27] = 0; out_8826852572688481834[28] = 0; out_8826852572688481834[29] = 0; out_8826852572688481834[30] = 0; out_8826852572688481834[31] = 0; out_8826852572688481834[32] = 0; out_8826852572688481834[33] = 1; out_8826852572688481834[34] = 0; out_8826852572688481834[35] = 0; out_8826852572688481834[36] = 0; out_8826852572688481834[37] = 0; out_8826852572688481834[38] = 0; out_8826852572688481834[39] = 0; out_8826852572688481834[40] = 0; out_8826852572688481834[41] = 0; out_8826852572688481834[42] = 0; out_8826852572688481834[43] = 0; out_8826852572688481834[44] = 0; out_8826852572688481834[45] = 0; out_8826852572688481834[46] = 0; out_8826852572688481834[47] = 0; out_8826852572688481834[48] = 0; out_8826852572688481834[49] = 0; out_8826852572688481834[50] = 0; out_8826852572688481834[51] = 0; out_8826852572688481834[52] = 0; out_8826852572688481834[53] = 0; out_8826852572688481834[54] = 0; out_8826852572688481834[55] = 0; out_8826852572688481834[56] = 1; out_8826852572688481834[57] = 0; out_8826852572688481834[58] = 0; out_8826852572688481834[59] = 0; out_8826852572688481834[60] = 0; out_8826852572688481834[61] = 0; out_8826852572688481834[62] = 0; out_8826852572688481834[63] = 0; out_8826852572688481834[64] = 0; out_8826852572688481834[65] = 0; } void h_33(double *state, double *unused, double *out_6518071604744541586) { out_6518071604744541586[0] = state[16]; out_6518071604744541586[1] = state[17]; out_6518071604744541586[2] = state[18]; } void H_33(double *state, double *unused, double *out_2550823157306607499) { out_2550823157306607499[0] = 0; out_2550823157306607499[1] = 0; out_2550823157306607499[2] = 0; out_2550823157306607499[3] = 0; out_2550823157306607499[4] = 0; out_2550823157306607499[5] = 0; out_2550823157306607499[6] = 0; out_2550823157306607499[7] = 0; out_2550823157306607499[8] = 0; out_2550823157306607499[9] = 0; out_2550823157306607499[10] = 0; out_2550823157306607499[11] = 0; out_2550823157306607499[12] = 0; out_2550823157306607499[13] = 0; out_2550823157306607499[14] = 0; out_2550823157306607499[15] = 0; out_2550823157306607499[16] = 1; out_2550823157306607499[17] = 0; out_2550823157306607499[18] = 0; out_2550823157306607499[19] = 0; out_2550823157306607499[20] = 0; out_2550823157306607499[21] = 0; out_2550823157306607499[22] = 0; out_2550823157306607499[23] = 0; out_2550823157306607499[24] = 0; out_2550823157306607499[25] = 0; out_2550823157306607499[26] = 0; out_2550823157306607499[27] = 0; out_2550823157306607499[28] = 0; out_2550823157306607499[29] = 0; out_2550823157306607499[30] = 0; out_2550823157306607499[31] = 0; out_2550823157306607499[32] = 0; out_2550823157306607499[33] = 0; out_2550823157306607499[34] = 0; out_2550823157306607499[35] = 0; out_2550823157306607499[36] = 0; out_2550823157306607499[37] = 0; out_2550823157306607499[38] = 0; out_2550823157306607499[39] = 1; out_2550823157306607499[40] = 0; out_2550823157306607499[41] = 0; out_2550823157306607499[42] = 0; out_2550823157306607499[43] = 0; out_2550823157306607499[44] = 0; out_2550823157306607499[45] = 0; out_2550823157306607499[46] = 0; out_2550823157306607499[47] = 0; out_2550823157306607499[48] = 0; out_2550823157306607499[49] = 0; out_2550823157306607499[50] = 0; out_2550823157306607499[51] = 0; out_2550823157306607499[52] = 0; out_2550823157306607499[53] = 0; out_2550823157306607499[54] = 0; out_2550823157306607499[55] = 0; out_2550823157306607499[56] = 0; out_2550823157306607499[57] = 0; out_2550823157306607499[58] = 0; out_2550823157306607499[59] = 0; out_2550823157306607499[60] = 0; out_2550823157306607499[61] = 0; out_2550823157306607499[62] = 1; out_2550823157306607499[63] = 0; out_2550823157306607499[64] = 0; out_2550823157306607499[65] = 0; } #include #include typedef Eigen::Matrix DDM; typedef Eigen::Matrix EEM; typedef Eigen::Matrix DEM; void predict(double *in_x, double *in_P, double *in_Q, double dt) { typedef Eigen::Matrix RRM; double nx[DIM] = {0}; double in_F[EDIM*EDIM] = {0}; // functions from sympy f_fun(in_x, dt, nx); F_fun(in_x, dt, in_F); EEM F(in_F); EEM P(in_P); EEM Q(in_Q); RRM F_main = F.topLeftCorner(MEDIM, MEDIM); P.topLeftCorner(MEDIM, MEDIM) = (F_main * P.topLeftCorner(MEDIM, MEDIM)) * F_main.transpose(); P.topRightCorner(MEDIM, EDIM - MEDIM) = F_main * P.topRightCorner(MEDIM, EDIM - MEDIM); P.bottomLeftCorner(EDIM - MEDIM, MEDIM) = P.bottomLeftCorner(EDIM - MEDIM, MEDIM) * F_main.transpose(); P = P + dt*Q; // copy out state memcpy(in_x, nx, DIM * sizeof(double)); memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double)); } // note: extra_args dim only correct when null space projecting // otherwise 1 template void update(double *in_x, double *in_P, Hfun h_fun, Hfun H_fun, Hfun Hea_fun, double *in_z, double *in_R, double *in_ea, double MAHA_THRESHOLD) { typedef Eigen::Matrix ZZM; typedef Eigen::Matrix ZDM; typedef Eigen::Matrix XEM; //typedef Eigen::Matrix EZM; typedef Eigen::Matrix X1M; typedef Eigen::Matrix XXM; double in_hx[ZDIM] = {0}; double in_H[ZDIM * DIM] = {0}; double in_H_mod[EDIM * DIM] = {0}; double delta_x[EDIM] = {0}; double x_new[DIM] = {0}; // state x, P Eigen::Matrix z(in_z); EEM P(in_P); ZZM pre_R(in_R); // functions from sympy h_fun(in_x, in_ea, in_hx); H_fun(in_x, in_ea, in_H); ZDM pre_H(in_H); // get y (y = z - hx) Eigen::Matrix pre_y(in_hx); pre_y = z - pre_y; X1M y; XXM H; XXM R; if (Hea_fun){ typedef Eigen::Matrix ZAM; double in_Hea[ZDIM * EADIM] = {0}; Hea_fun(in_x, in_ea, in_Hea); ZAM Hea(in_Hea); XXM A = Hea.transpose().fullPivLu().kernel(); y = A.transpose() * pre_y; H = A.transpose() * pre_H; R = A.transpose() * pre_R * A; } else { y = pre_y; H = pre_H; R = pre_R; } // get modified H H_mod_fun(in_x, in_H_mod); DEM H_mod(in_H_mod); XEM H_err = H * H_mod; // Do mahalobis distance test if (MAHA_TEST){ XXM a = (H_err * P * H_err.transpose() + R).inverse(); double maha_dist = y.transpose() * a * y; if (maha_dist > MAHA_THRESHOLD){ R = 1.0e16 * R; } } // Outlier resilient weighting double weight = 1;//(1.5)/(1 + y.squaredNorm()/R.sum()); // kalman gains and I_KH XXM S = ((H_err * P) * H_err.transpose()) + R/weight; XEM KT = S.fullPivLu().solve(H_err * P.transpose()); //EZM K = KT.transpose(); TODO: WHY DOES THIS NOT COMPILE? //EZM K = S.fullPivLu().solve(H_err * P.transpose()).transpose(); //std::cout << "Here is the matrix rot:\n" << K << std::endl; EEM I_KH = Eigen::Matrix::Identity() - (KT.transpose() * H_err); // update state by injecting dx Eigen::Matrix dx(delta_x); dx = (KT.transpose() * y); memcpy(delta_x, dx.data(), EDIM * sizeof(double)); err_fun(in_x, delta_x, x_new); Eigen::Matrix x(x_new); // update cov P = ((I_KH * P) * I_KH.transpose()) + ((KT.transpose() * R) * KT); // copy out state memcpy(in_x, x.data(), DIM * sizeof(double)); memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double)); memcpy(in_z, y.data(), y.rows() * sizeof(double)); } } extern "C" { void live_update_4(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_4, H_4, NULL, in_z, in_R, in_ea, MAHA_THRESH_4); } void live_update_9(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_9, H_9, NULL, in_z, in_R, in_ea, MAHA_THRESH_9); } void live_update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_10, H_10, NULL, in_z, in_R, in_ea, MAHA_THRESH_10); } void live_update_12(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_12, H_12, NULL, in_z, in_R, in_ea, MAHA_THRESH_12); } void live_update_35(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_35, H_35, NULL, in_z, in_R, in_ea, MAHA_THRESH_35); } void live_update_32(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<4, 3, 0>(in_x, in_P, h_32, H_32, NULL, in_z, in_R, in_ea, MAHA_THRESH_32); } void live_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_13, H_13, NULL, in_z, in_R, in_ea, MAHA_THRESH_13); } void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_14, H_14, NULL, in_z, in_R, in_ea, MAHA_THRESH_14); } void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_33, H_33, NULL, in_z, in_R, in_ea, MAHA_THRESH_33); } void live_H(double *in_vec, double *out_3790361225464775609) { H(in_vec, out_3790361225464775609); } void live_err_fun(double *nom_x, double *delta_x, double *out_256117888307370669) { err_fun(nom_x, delta_x, out_256117888307370669); } void live_inv_err_fun(double *nom_x, double *true_x, double *out_168922684109069761) { inv_err_fun(nom_x, true_x, out_168922684109069761); } void live_H_mod_fun(double *state, double *out_1717307412409030834) { H_mod_fun(state, out_1717307412409030834); } void live_f_fun(double *state, double dt, double *out_1245492105666153270) { f_fun(state, dt, out_1245492105666153270); } void live_F_fun(double *state, double dt, double *out_8230678422181646315) { F_fun(state, dt, out_8230678422181646315); } void live_h_4(double *state, double *unused, double *out_6969953109958175532) { h_4(state, unused, out_6969953109958175532); } void live_H_4(double *state, double *unused, double *out_9068042219318072479) { H_4(state, unused, out_9068042219318072479); } void live_h_9(double *state, double *unused, double *out_4316680648345213953) { h_9(state, unused, out_4316680648345213953); } void live_H_9(double *state, double *unused, double *out_8826852572688481834) { H_9(state, unused, out_8826852572688481834); } void live_h_10(double *state, double *unused, double *out_3010972192253664289) { h_10(state, unused, out_3010972192253664289); } void live_H_10(double *state, double *unused, double *out_5530846044175782832) { H_10(state, unused, out_5530846044175782832); } void live_h_12(double *state, double *unused, double *out_2575133727752322113) { h_12(state, unused, out_2575133727752322113); } void live_H_12(double *state, double *unused, double *out_8446943194270478812) { H_12(state, unused, out_8446943194270478812); } void live_h_35(double *state, double *unused, double *out_6925920790079934026) { h_35(state, unused, out_6925920790079934026); } void live_H_35(double *state, double *unused, double *out_5701380161945465103) { H_35(state, unused, out_5701380161945465103); } void live_h_32(double *state, double *unused, double *out_4102478073145767586) { h_32(state, unused, out_4102478073145767586); } void live_H_32(double *state, double *unused, double *out_2153535821958306374) { H_32(state, unused, out_2153535821958306374); } void live_h_13(double *state, double *unused, double *out_8720436796679792501) { h_13(state, unused, out_8720436796679792501); } void live_H_13(double *state, double *unused, double *out_2669095838760402568) { H_13(state, unused, out_2669095838760402568); } void live_h_14(double *state, double *unused, double *out_4316680648345213953) { h_14(state, unused, out_4316680648345213953); } void live_H_14(double *state, double *unused, double *out_8826852572688481834) { H_14(state, unused, out_8826852572688481834); } void live_h_33(double *state, double *unused, double *out_6518071604744541586) { h_33(state, unused, out_6518071604744541586); } void live_H_33(double *state, double *unused, double *out_2550823157306607499) { H_33(state, unused, out_2550823157306607499); } void live_predict(double *in_x, double *in_P, double *in_Q, double dt) { predict(in_x, in_P, in_Q, dt); } } const EKF live = { .name = "live", .kinds = { 4, 9, 10, 12, 35, 32, 13, 14, 33 }, .feature_kinds = { }, .f_fun = live_f_fun, .F_fun = live_F_fun, .err_fun = live_err_fun, .inv_err_fun = live_inv_err_fun, .H_mod_fun = live_H_mod_fun, .predict = live_predict, .hs = { { 4, live_h_4 }, { 9, live_h_9 }, { 10, live_h_10 }, { 12, live_h_12 }, { 35, live_h_35 }, { 32, live_h_32 }, { 13, live_h_13 }, { 14, live_h_14 }, { 33, live_h_33 }, }, .Hs = { { 4, live_H_4 }, { 9, live_H_9 }, { 10, live_H_10 }, { 12, live_H_12 }, { 35, live_H_35 }, { 32, live_H_32 }, { 13, live_H_13 }, { 14, live_H_14 }, { 33, live_H_33 }, }, .updates = { { 4, live_update_4 }, { 9, live_update_9 }, { 10, live_update_10 }, { 12, live_update_12 }, { 35, live_update_35 }, { 32, live_update_32 }, { 13, live_update_13 }, { 14, live_update_14 }, { 33, live_update_33 }, }, .Hes = { }, .sets = { }, .extra_routines = { { "H", live_H }, }, }; ekf_lib_init(live)