#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_5678547249781205843) { out_5678547249781205843[0] = 0; out_5678547249781205843[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_5678547249781205843[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; out_5678547249781205843[3] = cos(in_vec[1])*cos(in_vec[2]); out_5678547249781205843[4] = sin(in_vec[2])*cos(in_vec[1]); out_5678547249781205843[5] = -sin(in_vec[1]); out_5678547249781205843[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_5678547249781205843[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_5678547249781205843[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_5678547249781205843[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); out_5678547249781205843[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); out_5678547249781205843[11] = sin(in_vec[0])*cos(in_vec[1]); out_5678547249781205843[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_5678547249781205843[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_5678547249781205843[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_5678547249781205843[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); out_5678547249781205843[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); out_5678547249781205843[17] = cos(in_vec[0])*cos(in_vec[1]); } void err_fun(double *nom_x, double *delta_x, double *out_7786038415114058898) { out_7786038415114058898[0] = delta_x[0] + nom_x[0]; out_7786038415114058898[1] = delta_x[1] + nom_x[1]; out_7786038415114058898[2] = delta_x[2] + nom_x[2]; out_7786038415114058898[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_7786038415114058898[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_7786038415114058898[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_7786038415114058898[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_7786038415114058898[7] = delta_x[6] + nom_x[7]; out_7786038415114058898[8] = delta_x[7] + nom_x[8]; out_7786038415114058898[9] = delta_x[8] + nom_x[9]; out_7786038415114058898[10] = delta_x[9] + nom_x[10]; out_7786038415114058898[11] = delta_x[10] + nom_x[11]; out_7786038415114058898[12] = delta_x[11] + nom_x[12]; out_7786038415114058898[13] = delta_x[12] + nom_x[13]; out_7786038415114058898[14] = delta_x[13] + nom_x[14]; out_7786038415114058898[15] = delta_x[14] + nom_x[15]; out_7786038415114058898[16] = delta_x[15] + nom_x[16]; out_7786038415114058898[17] = delta_x[16] + nom_x[17]; out_7786038415114058898[18] = delta_x[17] + nom_x[18]; out_7786038415114058898[19] = delta_x[18] + nom_x[19]; out_7786038415114058898[20] = delta_x[19] + nom_x[20]; out_7786038415114058898[21] = delta_x[20] + nom_x[21]; } void inv_err_fun(double *nom_x, double *true_x, double *out_4024320067273853194) { out_4024320067273853194[0] = -nom_x[0] + true_x[0]; out_4024320067273853194[1] = -nom_x[1] + true_x[1]; out_4024320067273853194[2] = -nom_x[2] + true_x[2]; out_4024320067273853194[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_4024320067273853194[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_4024320067273853194[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_4024320067273853194[6] = -nom_x[7] + true_x[7]; out_4024320067273853194[7] = -nom_x[8] + true_x[8]; out_4024320067273853194[8] = -nom_x[9] + true_x[9]; out_4024320067273853194[9] = -nom_x[10] + true_x[10]; out_4024320067273853194[10] = -nom_x[11] + true_x[11]; out_4024320067273853194[11] = -nom_x[12] + true_x[12]; out_4024320067273853194[12] = -nom_x[13] + true_x[13]; out_4024320067273853194[13] = -nom_x[14] + true_x[14]; out_4024320067273853194[14] = -nom_x[15] + true_x[15]; out_4024320067273853194[15] = -nom_x[16] + true_x[16]; out_4024320067273853194[16] = -nom_x[17] + true_x[17]; out_4024320067273853194[17] = -nom_x[18] + true_x[18]; out_4024320067273853194[18] = -nom_x[19] + true_x[19]; out_4024320067273853194[19] = -nom_x[20] + true_x[20]; out_4024320067273853194[20] = -nom_x[21] + true_x[21]; } void H_mod_fun(double *state, double *out_5397558725730410635) { out_5397558725730410635[0] = 1.0; out_5397558725730410635[1] = 0; out_5397558725730410635[2] = 0; out_5397558725730410635[3] = 0; out_5397558725730410635[4] = 0; out_5397558725730410635[5] = 0; out_5397558725730410635[6] = 0; out_5397558725730410635[7] = 0; out_5397558725730410635[8] = 0; out_5397558725730410635[9] = 0; out_5397558725730410635[10] = 0; out_5397558725730410635[11] = 0; out_5397558725730410635[12] = 0; out_5397558725730410635[13] = 0; out_5397558725730410635[14] = 0; out_5397558725730410635[15] = 0; out_5397558725730410635[16] = 0; out_5397558725730410635[17] = 0; out_5397558725730410635[18] = 0; out_5397558725730410635[19] = 0; out_5397558725730410635[20] = 0; out_5397558725730410635[21] = 0; out_5397558725730410635[22] = 1.0; out_5397558725730410635[23] = 0; out_5397558725730410635[24] = 0; out_5397558725730410635[25] = 0; out_5397558725730410635[26] = 0; out_5397558725730410635[27] = 0; out_5397558725730410635[28] = 0; out_5397558725730410635[29] = 0; out_5397558725730410635[30] = 0; out_5397558725730410635[31] = 0; out_5397558725730410635[32] = 0; out_5397558725730410635[33] = 0; out_5397558725730410635[34] = 0; out_5397558725730410635[35] = 0; out_5397558725730410635[36] = 0; out_5397558725730410635[37] = 0; out_5397558725730410635[38] = 0; out_5397558725730410635[39] = 0; out_5397558725730410635[40] = 0; out_5397558725730410635[41] = 0; out_5397558725730410635[42] = 0; out_5397558725730410635[43] = 0; out_5397558725730410635[44] = 1.0; out_5397558725730410635[45] = 0; out_5397558725730410635[46] = 0; out_5397558725730410635[47] = 0; out_5397558725730410635[48] = 0; out_5397558725730410635[49] = 0; out_5397558725730410635[50] = 0; out_5397558725730410635[51] = 0; out_5397558725730410635[52] = 0; out_5397558725730410635[53] = 0; out_5397558725730410635[54] = 0; out_5397558725730410635[55] = 0; out_5397558725730410635[56] = 0; out_5397558725730410635[57] = 0; out_5397558725730410635[58] = 0; out_5397558725730410635[59] = 0; out_5397558725730410635[60] = 0; out_5397558725730410635[61] = 0; out_5397558725730410635[62] = 0; out_5397558725730410635[63] = 0; out_5397558725730410635[64] = 0; out_5397558725730410635[65] = 0; out_5397558725730410635[66] = -0.5*state[4]; out_5397558725730410635[67] = -0.5*state[5]; out_5397558725730410635[68] = -0.5*state[6]; out_5397558725730410635[69] = 0; out_5397558725730410635[70] = 0; out_5397558725730410635[71] = 0; out_5397558725730410635[72] = 0; out_5397558725730410635[73] = 0; out_5397558725730410635[74] = 0; out_5397558725730410635[75] = 0; out_5397558725730410635[76] = 0; out_5397558725730410635[77] = 0; out_5397558725730410635[78] = 0; out_5397558725730410635[79] = 0; out_5397558725730410635[80] = 0; out_5397558725730410635[81] = 0; out_5397558725730410635[82] = 0; out_5397558725730410635[83] = 0; out_5397558725730410635[84] = 0; out_5397558725730410635[85] = 0; out_5397558725730410635[86] = 0; out_5397558725730410635[87] = 0.5*state[3]; out_5397558725730410635[88] = 0.5*state[6]; out_5397558725730410635[89] = -0.5*state[5]; out_5397558725730410635[90] = 0; out_5397558725730410635[91] = 0; out_5397558725730410635[92] = 0; out_5397558725730410635[93] = 0; out_5397558725730410635[94] = 0; out_5397558725730410635[95] = 0; out_5397558725730410635[96] = 0; out_5397558725730410635[97] = 0; out_5397558725730410635[98] = 0; out_5397558725730410635[99] = 0; out_5397558725730410635[100] = 0; out_5397558725730410635[101] = 0; out_5397558725730410635[102] = 0; out_5397558725730410635[103] = 0; out_5397558725730410635[104] = 0; out_5397558725730410635[105] = 0; out_5397558725730410635[106] = 0; out_5397558725730410635[107] = 0; out_5397558725730410635[108] = -0.5*state[6]; out_5397558725730410635[109] = 0.5*state[3]; out_5397558725730410635[110] = 0.5*state[4]; out_5397558725730410635[111] = 0; out_5397558725730410635[112] = 0; out_5397558725730410635[113] = 0; out_5397558725730410635[114] = 0; out_5397558725730410635[115] = 0; out_5397558725730410635[116] = 0; out_5397558725730410635[117] = 0; out_5397558725730410635[118] = 0; out_5397558725730410635[119] = 0; out_5397558725730410635[120] = 0; out_5397558725730410635[121] = 0; out_5397558725730410635[122] = 0; out_5397558725730410635[123] = 0; out_5397558725730410635[124] = 0; out_5397558725730410635[125] = 0; out_5397558725730410635[126] = 0; out_5397558725730410635[127] = 0; out_5397558725730410635[128] = 0; out_5397558725730410635[129] = 0.5*state[5]; out_5397558725730410635[130] = -0.5*state[4]; out_5397558725730410635[131] = 0.5*state[3]; out_5397558725730410635[132] = 0; out_5397558725730410635[133] = 0; out_5397558725730410635[134] = 0; out_5397558725730410635[135] = 0; out_5397558725730410635[136] = 0; out_5397558725730410635[137] = 0; out_5397558725730410635[138] = 0; out_5397558725730410635[139] = 0; out_5397558725730410635[140] = 0; out_5397558725730410635[141] = 0; out_5397558725730410635[142] = 0; out_5397558725730410635[143] = 0; out_5397558725730410635[144] = 0; out_5397558725730410635[145] = 0; out_5397558725730410635[146] = 0; out_5397558725730410635[147] = 0; out_5397558725730410635[148] = 0; out_5397558725730410635[149] = 0; out_5397558725730410635[150] = 0; out_5397558725730410635[151] = 0; out_5397558725730410635[152] = 0; out_5397558725730410635[153] = 1.0; out_5397558725730410635[154] = 0; out_5397558725730410635[155] = 0; out_5397558725730410635[156] = 0; out_5397558725730410635[157] = 0; out_5397558725730410635[158] = 0; out_5397558725730410635[159] = 0; out_5397558725730410635[160] = 0; out_5397558725730410635[161] = 0; out_5397558725730410635[162] = 0; out_5397558725730410635[163] = 0; out_5397558725730410635[164] = 0; out_5397558725730410635[165] = 0; out_5397558725730410635[166] = 0; out_5397558725730410635[167] = 0; out_5397558725730410635[168] = 0; out_5397558725730410635[169] = 0; out_5397558725730410635[170] = 0; out_5397558725730410635[171] = 0; out_5397558725730410635[172] = 0; out_5397558725730410635[173] = 0; out_5397558725730410635[174] = 0; out_5397558725730410635[175] = 1.0; out_5397558725730410635[176] = 0; out_5397558725730410635[177] = 0; out_5397558725730410635[178] = 0; out_5397558725730410635[179] = 0; out_5397558725730410635[180] = 0; out_5397558725730410635[181] = 0; out_5397558725730410635[182] = 0; out_5397558725730410635[183] = 0; out_5397558725730410635[184] = 0; out_5397558725730410635[185] = 0; out_5397558725730410635[186] = 0; out_5397558725730410635[187] = 0; out_5397558725730410635[188] = 0; out_5397558725730410635[189] = 0; out_5397558725730410635[190] = 0; out_5397558725730410635[191] = 0; out_5397558725730410635[192] = 0; out_5397558725730410635[193] = 0; out_5397558725730410635[194] = 0; out_5397558725730410635[195] = 0; out_5397558725730410635[196] = 0; out_5397558725730410635[197] = 1.0; out_5397558725730410635[198] = 0; out_5397558725730410635[199] = 0; out_5397558725730410635[200] = 0; out_5397558725730410635[201] = 0; out_5397558725730410635[202] = 0; out_5397558725730410635[203] = 0; out_5397558725730410635[204] = 0; out_5397558725730410635[205] = 0; out_5397558725730410635[206] = 0; out_5397558725730410635[207] = 0; out_5397558725730410635[208] = 0; out_5397558725730410635[209] = 0; out_5397558725730410635[210] = 0; out_5397558725730410635[211] = 0; out_5397558725730410635[212] = 0; out_5397558725730410635[213] = 0; out_5397558725730410635[214] = 0; out_5397558725730410635[215] = 0; out_5397558725730410635[216] = 0; out_5397558725730410635[217] = 0; out_5397558725730410635[218] = 0; out_5397558725730410635[219] = 1.0; out_5397558725730410635[220] = 0; out_5397558725730410635[221] = 0; out_5397558725730410635[222] = 0; out_5397558725730410635[223] = 0; out_5397558725730410635[224] = 0; out_5397558725730410635[225] = 0; out_5397558725730410635[226] = 0; out_5397558725730410635[227] = 0; out_5397558725730410635[228] = 0; out_5397558725730410635[229] = 0; out_5397558725730410635[230] = 0; out_5397558725730410635[231] = 0; out_5397558725730410635[232] = 0; out_5397558725730410635[233] = 0; out_5397558725730410635[234] = 0; out_5397558725730410635[235] = 0; out_5397558725730410635[236] = 0; out_5397558725730410635[237] = 0; out_5397558725730410635[238] = 0; out_5397558725730410635[239] = 0; out_5397558725730410635[240] = 0; out_5397558725730410635[241] = 1.0; out_5397558725730410635[242] = 0; out_5397558725730410635[243] = 0; out_5397558725730410635[244] = 0; out_5397558725730410635[245] = 0; out_5397558725730410635[246] = 0; out_5397558725730410635[247] = 0; out_5397558725730410635[248] = 0; out_5397558725730410635[249] = 0; out_5397558725730410635[250] = 0; out_5397558725730410635[251] = 0; out_5397558725730410635[252] = 0; out_5397558725730410635[253] = 0; out_5397558725730410635[254] = 0; out_5397558725730410635[255] = 0; out_5397558725730410635[256] = 0; out_5397558725730410635[257] = 0; out_5397558725730410635[258] = 0; out_5397558725730410635[259] = 0; out_5397558725730410635[260] = 0; out_5397558725730410635[261] = 0; out_5397558725730410635[262] = 0; out_5397558725730410635[263] = 1.0; out_5397558725730410635[264] = 0; out_5397558725730410635[265] = 0; out_5397558725730410635[266] = 0; out_5397558725730410635[267] = 0; out_5397558725730410635[268] = 0; out_5397558725730410635[269] = 0; out_5397558725730410635[270] = 0; out_5397558725730410635[271] = 0; out_5397558725730410635[272] = 0; out_5397558725730410635[273] = 0; out_5397558725730410635[274] = 0; out_5397558725730410635[275] = 0; out_5397558725730410635[276] = 0; out_5397558725730410635[277] = 0; out_5397558725730410635[278] = 0; out_5397558725730410635[279] = 0; out_5397558725730410635[280] = 0; out_5397558725730410635[281] = 0; out_5397558725730410635[282] = 0; out_5397558725730410635[283] = 0; out_5397558725730410635[284] = 0; out_5397558725730410635[285] = 1.0; out_5397558725730410635[286] = 0; out_5397558725730410635[287] = 0; out_5397558725730410635[288] = 0; out_5397558725730410635[289] = 0; out_5397558725730410635[290] = 0; out_5397558725730410635[291] = 0; out_5397558725730410635[292] = 0; out_5397558725730410635[293] = 0; out_5397558725730410635[294] = 0; out_5397558725730410635[295] = 0; out_5397558725730410635[296] = 0; out_5397558725730410635[297] = 0; out_5397558725730410635[298] = 0; out_5397558725730410635[299] = 0; out_5397558725730410635[300] = 0; out_5397558725730410635[301] = 0; out_5397558725730410635[302] = 0; out_5397558725730410635[303] = 0; out_5397558725730410635[304] = 0; out_5397558725730410635[305] = 0; out_5397558725730410635[306] = 0; out_5397558725730410635[307] = 1.0; out_5397558725730410635[308] = 0; out_5397558725730410635[309] = 0; out_5397558725730410635[310] = 0; out_5397558725730410635[311] = 0; out_5397558725730410635[312] = 0; out_5397558725730410635[313] = 0; out_5397558725730410635[314] = 0; out_5397558725730410635[315] = 0; out_5397558725730410635[316] = 0; out_5397558725730410635[317] = 0; out_5397558725730410635[318] = 0; out_5397558725730410635[319] = 0; out_5397558725730410635[320] = 0; out_5397558725730410635[321] = 0; out_5397558725730410635[322] = 0; out_5397558725730410635[323] = 0; out_5397558725730410635[324] = 0; out_5397558725730410635[325] = 0; out_5397558725730410635[326] = 0; out_5397558725730410635[327] = 0; out_5397558725730410635[328] = 0; out_5397558725730410635[329] = 1.0; out_5397558725730410635[330] = 0; out_5397558725730410635[331] = 0; out_5397558725730410635[332] = 0; out_5397558725730410635[333] = 0; out_5397558725730410635[334] = 0; out_5397558725730410635[335] = 0; out_5397558725730410635[336] = 0; out_5397558725730410635[337] = 0; out_5397558725730410635[338] = 0; out_5397558725730410635[339] = 0; out_5397558725730410635[340] = 0; out_5397558725730410635[341] = 0; out_5397558725730410635[342] = 0; out_5397558725730410635[343] = 0; out_5397558725730410635[344] = 0; out_5397558725730410635[345] = 0; out_5397558725730410635[346] = 0; out_5397558725730410635[347] = 0; out_5397558725730410635[348] = 0; out_5397558725730410635[349] = 0; out_5397558725730410635[350] = 0; out_5397558725730410635[351] = 1.0; out_5397558725730410635[352] = 0; out_5397558725730410635[353] = 0; out_5397558725730410635[354] = 0; out_5397558725730410635[355] = 0; out_5397558725730410635[356] = 0; out_5397558725730410635[357] = 0; out_5397558725730410635[358] = 0; out_5397558725730410635[359] = 0; out_5397558725730410635[360] = 0; out_5397558725730410635[361] = 0; out_5397558725730410635[362] = 0; out_5397558725730410635[363] = 0; out_5397558725730410635[364] = 0; out_5397558725730410635[365] = 0; out_5397558725730410635[366] = 0; out_5397558725730410635[367] = 0; out_5397558725730410635[368] = 0; out_5397558725730410635[369] = 0; out_5397558725730410635[370] = 0; out_5397558725730410635[371] = 0; out_5397558725730410635[372] = 0; out_5397558725730410635[373] = 1.0; out_5397558725730410635[374] = 0; out_5397558725730410635[375] = 0; out_5397558725730410635[376] = 0; out_5397558725730410635[377] = 0; out_5397558725730410635[378] = 0; out_5397558725730410635[379] = 0; out_5397558725730410635[380] = 0; out_5397558725730410635[381] = 0; out_5397558725730410635[382] = 0; out_5397558725730410635[383] = 0; out_5397558725730410635[384] = 0; out_5397558725730410635[385] = 0; out_5397558725730410635[386] = 0; out_5397558725730410635[387] = 0; out_5397558725730410635[388] = 0; out_5397558725730410635[389] = 0; out_5397558725730410635[390] = 0; out_5397558725730410635[391] = 0; out_5397558725730410635[392] = 0; out_5397558725730410635[393] = 0; out_5397558725730410635[394] = 0; out_5397558725730410635[395] = 1.0; out_5397558725730410635[396] = 0; out_5397558725730410635[397] = 0; out_5397558725730410635[398] = 0; out_5397558725730410635[399] = 0; out_5397558725730410635[400] = 0; out_5397558725730410635[401] = 0; out_5397558725730410635[402] = 0; out_5397558725730410635[403] = 0; out_5397558725730410635[404] = 0; out_5397558725730410635[405] = 0; out_5397558725730410635[406] = 0; out_5397558725730410635[407] = 0; out_5397558725730410635[408] = 0; out_5397558725730410635[409] = 0; out_5397558725730410635[410] = 0; out_5397558725730410635[411] = 0; out_5397558725730410635[412] = 0; out_5397558725730410635[413] = 0; out_5397558725730410635[414] = 0; out_5397558725730410635[415] = 0; out_5397558725730410635[416] = 0; out_5397558725730410635[417] = 1.0; out_5397558725730410635[418] = 0; out_5397558725730410635[419] = 0; out_5397558725730410635[420] = 0; out_5397558725730410635[421] = 0; out_5397558725730410635[422] = 0; out_5397558725730410635[423] = 0; out_5397558725730410635[424] = 0; out_5397558725730410635[425] = 0; out_5397558725730410635[426] = 0; out_5397558725730410635[427] = 0; out_5397558725730410635[428] = 0; out_5397558725730410635[429] = 0; out_5397558725730410635[430] = 0; out_5397558725730410635[431] = 0; out_5397558725730410635[432] = 0; out_5397558725730410635[433] = 0; out_5397558725730410635[434] = 0; out_5397558725730410635[435] = 0; out_5397558725730410635[436] = 0; out_5397558725730410635[437] = 0; out_5397558725730410635[438] = 0; out_5397558725730410635[439] = 1.0; out_5397558725730410635[440] = 0; out_5397558725730410635[441] = 0; out_5397558725730410635[442] = 0; out_5397558725730410635[443] = 0; out_5397558725730410635[444] = 0; out_5397558725730410635[445] = 0; out_5397558725730410635[446] = 0; out_5397558725730410635[447] = 0; out_5397558725730410635[448] = 0; out_5397558725730410635[449] = 0; out_5397558725730410635[450] = 0; out_5397558725730410635[451] = 0; out_5397558725730410635[452] = 0; out_5397558725730410635[453] = 0; out_5397558725730410635[454] = 0; out_5397558725730410635[455] = 0; out_5397558725730410635[456] = 0; out_5397558725730410635[457] = 0; out_5397558725730410635[458] = 0; out_5397558725730410635[459] = 0; out_5397558725730410635[460] = 0; out_5397558725730410635[461] = 1.0; } void f_fun(double *state, double dt, double *out_4167526640936982777) { out_4167526640936982777[0] = dt*state[7] + state[0]; out_4167526640936982777[1] = dt*state[8] + state[1]; out_4167526640936982777[2] = dt*state[9] + state[2]; out_4167526640936982777[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; out_4167526640936982777[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; out_4167526640936982777[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; out_4167526640936982777[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; out_4167526640936982777[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_4167526640936982777[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_4167526640936982777[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_4167526640936982777[10] = state[10]; out_4167526640936982777[11] = state[11]; out_4167526640936982777[12] = state[12]; out_4167526640936982777[13] = state[13]; out_4167526640936982777[14] = state[14]; out_4167526640936982777[15] = state[15]; out_4167526640936982777[16] = state[16]; out_4167526640936982777[17] = state[17]; out_4167526640936982777[18] = state[18]; out_4167526640936982777[19] = state[19]; out_4167526640936982777[20] = state[20]; out_4167526640936982777[21] = state[21]; } void F_fun(double *state, double dt, double *out_5774721427747447809) { out_5774721427747447809[0] = 1; out_5774721427747447809[1] = 0; out_5774721427747447809[2] = 0; out_5774721427747447809[3] = 0; out_5774721427747447809[4] = 0; out_5774721427747447809[5] = 0; out_5774721427747447809[6] = dt; out_5774721427747447809[7] = 0; out_5774721427747447809[8] = 0; out_5774721427747447809[9] = 0; out_5774721427747447809[10] = 0; out_5774721427747447809[11] = 0; out_5774721427747447809[12] = 0; out_5774721427747447809[13] = 0; out_5774721427747447809[14] = 0; out_5774721427747447809[15] = 0; out_5774721427747447809[16] = 0; out_5774721427747447809[17] = 0; out_5774721427747447809[18] = 0; out_5774721427747447809[19] = 0; out_5774721427747447809[20] = 0; out_5774721427747447809[21] = 0; out_5774721427747447809[22] = 1; out_5774721427747447809[23] = 0; out_5774721427747447809[24] = 0; out_5774721427747447809[25] = 0; out_5774721427747447809[26] = 0; out_5774721427747447809[27] = 0; out_5774721427747447809[28] = dt; out_5774721427747447809[29] = 0; out_5774721427747447809[30] = 0; out_5774721427747447809[31] = 0; out_5774721427747447809[32] = 0; out_5774721427747447809[33] = 0; out_5774721427747447809[34] = 0; out_5774721427747447809[35] = 0; out_5774721427747447809[36] = 0; out_5774721427747447809[37] = 0; out_5774721427747447809[38] = 0; out_5774721427747447809[39] = 0; out_5774721427747447809[40] = 0; out_5774721427747447809[41] = 0; out_5774721427747447809[42] = 0; out_5774721427747447809[43] = 0; out_5774721427747447809[44] = 1; out_5774721427747447809[45] = 0; out_5774721427747447809[46] = 0; out_5774721427747447809[47] = 0; out_5774721427747447809[48] = 0; out_5774721427747447809[49] = 0; out_5774721427747447809[50] = dt; out_5774721427747447809[51] = 0; out_5774721427747447809[52] = 0; out_5774721427747447809[53] = 0; out_5774721427747447809[54] = 0; out_5774721427747447809[55] = 0; out_5774721427747447809[56] = 0; out_5774721427747447809[57] = 0; out_5774721427747447809[58] = 0; out_5774721427747447809[59] = 0; out_5774721427747447809[60] = 0; out_5774721427747447809[61] = 0; out_5774721427747447809[62] = 0; out_5774721427747447809[63] = 0; out_5774721427747447809[64] = 0; out_5774721427747447809[65] = 0; out_5774721427747447809[66] = 1; out_5774721427747447809[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_5774721427747447809[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_5774721427747447809[69] = 0; out_5774721427747447809[70] = 0; out_5774721427747447809[71] = 0; out_5774721427747447809[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); out_5774721427747447809[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); out_5774721427747447809[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); out_5774721427747447809[75] = 0; out_5774721427747447809[76] = 0; out_5774721427747447809[77] = 0; out_5774721427747447809[78] = 0; out_5774721427747447809[79] = 0; out_5774721427747447809[80] = 0; out_5774721427747447809[81] = 0; out_5774721427747447809[82] = 0; out_5774721427747447809[83] = 0; out_5774721427747447809[84] = 0; out_5774721427747447809[85] = 0; out_5774721427747447809[86] = 0; out_5774721427747447809[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_5774721427747447809[88] = 1; out_5774721427747447809[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_5774721427747447809[90] = 0; out_5774721427747447809[91] = 0; out_5774721427747447809[92] = 0; out_5774721427747447809[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); out_5774721427747447809[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); out_5774721427747447809[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); out_5774721427747447809[96] = 0; out_5774721427747447809[97] = 0; out_5774721427747447809[98] = 0; out_5774721427747447809[99] = 0; out_5774721427747447809[100] = 0; out_5774721427747447809[101] = 0; out_5774721427747447809[102] = 0; out_5774721427747447809[103] = 0; out_5774721427747447809[104] = 0; out_5774721427747447809[105] = 0; out_5774721427747447809[106] = 0; out_5774721427747447809[107] = 0; out_5774721427747447809[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_5774721427747447809[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_5774721427747447809[110] = 1; out_5774721427747447809[111] = 0; out_5774721427747447809[112] = 0; out_5774721427747447809[113] = 0; out_5774721427747447809[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); out_5774721427747447809[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); out_5774721427747447809[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); out_5774721427747447809[117] = 0; out_5774721427747447809[118] = 0; out_5774721427747447809[119] = 0; out_5774721427747447809[120] = 0; out_5774721427747447809[121] = 0; out_5774721427747447809[122] = 0; out_5774721427747447809[123] = 0; out_5774721427747447809[124] = 0; out_5774721427747447809[125] = 0; out_5774721427747447809[126] = 0; out_5774721427747447809[127] = 0; out_5774721427747447809[128] = 0; out_5774721427747447809[129] = 0; out_5774721427747447809[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_5774721427747447809[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_5774721427747447809[132] = 1; out_5774721427747447809[133] = 0; out_5774721427747447809[134] = 0; out_5774721427747447809[135] = 0; out_5774721427747447809[136] = 0; out_5774721427747447809[137] = 0; out_5774721427747447809[138] = 0; out_5774721427747447809[139] = 0; out_5774721427747447809[140] = 0; out_5774721427747447809[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); out_5774721427747447809[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); out_5774721427747447809[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); out_5774721427747447809[144] = 0; out_5774721427747447809[145] = 0; out_5774721427747447809[146] = 0; out_5774721427747447809[147] = 0; out_5774721427747447809[148] = 0; out_5774721427747447809[149] = 0; out_5774721427747447809[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_5774721427747447809[151] = 0; out_5774721427747447809[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_5774721427747447809[153] = 0; out_5774721427747447809[154] = 1; out_5774721427747447809[155] = 0; out_5774721427747447809[156] = 0; out_5774721427747447809[157] = 0; out_5774721427747447809[158] = 0; out_5774721427747447809[159] = 0; out_5774721427747447809[160] = 0; out_5774721427747447809[161] = 0; out_5774721427747447809[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); out_5774721427747447809[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); out_5774721427747447809[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); out_5774721427747447809[165] = 0; out_5774721427747447809[166] = 0; out_5774721427747447809[167] = 0; out_5774721427747447809[168] = 0; out_5774721427747447809[169] = 0; out_5774721427747447809[170] = 0; out_5774721427747447809[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_5774721427747447809[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_5774721427747447809[173] = 0; out_5774721427747447809[174] = 0; out_5774721427747447809[175] = 0; out_5774721427747447809[176] = 1; out_5774721427747447809[177] = 0; out_5774721427747447809[178] = 0; out_5774721427747447809[179] = 0; out_5774721427747447809[180] = 0; out_5774721427747447809[181] = 0; out_5774721427747447809[182] = 0; out_5774721427747447809[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); out_5774721427747447809[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); out_5774721427747447809[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); out_5774721427747447809[186] = 0; out_5774721427747447809[187] = 0; out_5774721427747447809[188] = 0; out_5774721427747447809[189] = 0; out_5774721427747447809[190] = 0; out_5774721427747447809[191] = 0; out_5774721427747447809[192] = 0; out_5774721427747447809[193] = 0; out_5774721427747447809[194] = 0; out_5774721427747447809[195] = 0; out_5774721427747447809[196] = 0; out_5774721427747447809[197] = 0; out_5774721427747447809[198] = 1; out_5774721427747447809[199] = 0; out_5774721427747447809[200] = 0; out_5774721427747447809[201] = 0; out_5774721427747447809[202] = 0; out_5774721427747447809[203] = 0; out_5774721427747447809[204] = 0; out_5774721427747447809[205] = 0; out_5774721427747447809[206] = 0; out_5774721427747447809[207] = 0; out_5774721427747447809[208] = 0; out_5774721427747447809[209] = 0; out_5774721427747447809[210] = 0; out_5774721427747447809[211] = 0; out_5774721427747447809[212] = 0; out_5774721427747447809[213] = 0; out_5774721427747447809[214] = 0; out_5774721427747447809[215] = 0; out_5774721427747447809[216] = 0; out_5774721427747447809[217] = 0; out_5774721427747447809[218] = 0; out_5774721427747447809[219] = 0; out_5774721427747447809[220] = 1; out_5774721427747447809[221] = 0; out_5774721427747447809[222] = 0; out_5774721427747447809[223] = 0; out_5774721427747447809[224] = 0; out_5774721427747447809[225] = 0; out_5774721427747447809[226] = 0; out_5774721427747447809[227] = 0; out_5774721427747447809[228] = 0; out_5774721427747447809[229] = 0; out_5774721427747447809[230] = 0; out_5774721427747447809[231] = 0; out_5774721427747447809[232] = 0; out_5774721427747447809[233] = 0; out_5774721427747447809[234] = 0; out_5774721427747447809[235] = 0; out_5774721427747447809[236] = 0; out_5774721427747447809[237] = 0; out_5774721427747447809[238] = 0; out_5774721427747447809[239] = 0; out_5774721427747447809[240] = 0; out_5774721427747447809[241] = 0; out_5774721427747447809[242] = 1; out_5774721427747447809[243] = 0; out_5774721427747447809[244] = 0; out_5774721427747447809[245] = 0; out_5774721427747447809[246] = 0; out_5774721427747447809[247] = 0; out_5774721427747447809[248] = 0; out_5774721427747447809[249] = 0; out_5774721427747447809[250] = 0; out_5774721427747447809[251] = 0; out_5774721427747447809[252] = 0; out_5774721427747447809[253] = 0; out_5774721427747447809[254] = 0; out_5774721427747447809[255] = 0; out_5774721427747447809[256] = 0; out_5774721427747447809[257] = 0; out_5774721427747447809[258] = 0; out_5774721427747447809[259] = 0; out_5774721427747447809[260] = 0; out_5774721427747447809[261] = 0; out_5774721427747447809[262] = 0; out_5774721427747447809[263] = 0; out_5774721427747447809[264] = 1; out_5774721427747447809[265] = 0; out_5774721427747447809[266] = 0; out_5774721427747447809[267] = 0; out_5774721427747447809[268] = 0; out_5774721427747447809[269] = 0; out_5774721427747447809[270] = 0; out_5774721427747447809[271] = 0; out_5774721427747447809[272] = 0; out_5774721427747447809[273] = 0; out_5774721427747447809[274] = 0; out_5774721427747447809[275] = 0; out_5774721427747447809[276] = 0; out_5774721427747447809[277] = 0; out_5774721427747447809[278] = 0; out_5774721427747447809[279] = 0; out_5774721427747447809[280] = 0; out_5774721427747447809[281] = 0; out_5774721427747447809[282] = 0; out_5774721427747447809[283] = 0; out_5774721427747447809[284] = 0; out_5774721427747447809[285] = 0; out_5774721427747447809[286] = 1; out_5774721427747447809[287] = 0; out_5774721427747447809[288] = 0; out_5774721427747447809[289] = 0; out_5774721427747447809[290] = 0; out_5774721427747447809[291] = 0; out_5774721427747447809[292] = 0; out_5774721427747447809[293] = 0; out_5774721427747447809[294] = 0; out_5774721427747447809[295] = 0; out_5774721427747447809[296] = 0; out_5774721427747447809[297] = 0; out_5774721427747447809[298] = 0; out_5774721427747447809[299] = 0; out_5774721427747447809[300] = 0; out_5774721427747447809[301] = 0; out_5774721427747447809[302] = 0; out_5774721427747447809[303] = 0; out_5774721427747447809[304] = 0; out_5774721427747447809[305] = 0; out_5774721427747447809[306] = 0; out_5774721427747447809[307] = 0; out_5774721427747447809[308] = 1; out_5774721427747447809[309] = 0; out_5774721427747447809[310] = 0; out_5774721427747447809[311] = 0; out_5774721427747447809[312] = 0; out_5774721427747447809[313] = 0; out_5774721427747447809[314] = 0; out_5774721427747447809[315] = 0; out_5774721427747447809[316] = 0; out_5774721427747447809[317] = 0; out_5774721427747447809[318] = 0; out_5774721427747447809[319] = 0; out_5774721427747447809[320] = 0; out_5774721427747447809[321] = 0; out_5774721427747447809[322] = 0; out_5774721427747447809[323] = 0; out_5774721427747447809[324] = 0; out_5774721427747447809[325] = 0; out_5774721427747447809[326] = 0; out_5774721427747447809[327] = 0; out_5774721427747447809[328] = 0; out_5774721427747447809[329] = 0; out_5774721427747447809[330] = 1; out_5774721427747447809[331] = 0; out_5774721427747447809[332] = 0; out_5774721427747447809[333] = 0; out_5774721427747447809[334] = 0; out_5774721427747447809[335] = 0; out_5774721427747447809[336] = 0; out_5774721427747447809[337] = 0; out_5774721427747447809[338] = 0; out_5774721427747447809[339] = 0; out_5774721427747447809[340] = 0; out_5774721427747447809[341] = 0; out_5774721427747447809[342] = 0; out_5774721427747447809[343] = 0; out_5774721427747447809[344] = 0; out_5774721427747447809[345] = 0; out_5774721427747447809[346] = 0; out_5774721427747447809[347] = 0; out_5774721427747447809[348] = 0; out_5774721427747447809[349] = 0; out_5774721427747447809[350] = 0; out_5774721427747447809[351] = 0; out_5774721427747447809[352] = 1; out_5774721427747447809[353] = 0; out_5774721427747447809[354] = 0; out_5774721427747447809[355] = 0; out_5774721427747447809[356] = 0; out_5774721427747447809[357] = 0; out_5774721427747447809[358] = 0; out_5774721427747447809[359] = 0; out_5774721427747447809[360] = 0; out_5774721427747447809[361] = 0; out_5774721427747447809[362] = 0; out_5774721427747447809[363] = 0; out_5774721427747447809[364] = 0; out_5774721427747447809[365] = 0; out_5774721427747447809[366] = 0; out_5774721427747447809[367] = 0; out_5774721427747447809[368] = 0; out_5774721427747447809[369] = 0; out_5774721427747447809[370] = 0; out_5774721427747447809[371] = 0; out_5774721427747447809[372] = 0; out_5774721427747447809[373] = 0; out_5774721427747447809[374] = 1; out_5774721427747447809[375] = 0; out_5774721427747447809[376] = 0; out_5774721427747447809[377] = 0; out_5774721427747447809[378] = 0; out_5774721427747447809[379] = 0; out_5774721427747447809[380] = 0; out_5774721427747447809[381] = 0; out_5774721427747447809[382] = 0; out_5774721427747447809[383] = 0; out_5774721427747447809[384] = 0; out_5774721427747447809[385] = 0; out_5774721427747447809[386] = 0; out_5774721427747447809[387] = 0; out_5774721427747447809[388] = 0; out_5774721427747447809[389] = 0; out_5774721427747447809[390] = 0; out_5774721427747447809[391] = 0; out_5774721427747447809[392] = 0; out_5774721427747447809[393] = 0; out_5774721427747447809[394] = 0; out_5774721427747447809[395] = 0; out_5774721427747447809[396] = 1; out_5774721427747447809[397] = 0; out_5774721427747447809[398] = 0; out_5774721427747447809[399] = 0; out_5774721427747447809[400] = 0; out_5774721427747447809[401] = 0; out_5774721427747447809[402] = 0; out_5774721427747447809[403] = 0; out_5774721427747447809[404] = 0; out_5774721427747447809[405] = 0; out_5774721427747447809[406] = 0; out_5774721427747447809[407] = 0; out_5774721427747447809[408] = 0; out_5774721427747447809[409] = 0; out_5774721427747447809[410] = 0; out_5774721427747447809[411] = 0; out_5774721427747447809[412] = 0; out_5774721427747447809[413] = 0; out_5774721427747447809[414] = 0; out_5774721427747447809[415] = 0; out_5774721427747447809[416] = 0; out_5774721427747447809[417] = 0; out_5774721427747447809[418] = 1; out_5774721427747447809[419] = 0; out_5774721427747447809[420] = 0; out_5774721427747447809[421] = 0; out_5774721427747447809[422] = 0; out_5774721427747447809[423] = 0; out_5774721427747447809[424] = 0; out_5774721427747447809[425] = 0; out_5774721427747447809[426] = 0; out_5774721427747447809[427] = 0; out_5774721427747447809[428] = 0; out_5774721427747447809[429] = 0; out_5774721427747447809[430] = 0; out_5774721427747447809[431] = 0; out_5774721427747447809[432] = 0; out_5774721427747447809[433] = 0; out_5774721427747447809[434] = 0; out_5774721427747447809[435] = 0; out_5774721427747447809[436] = 0; out_5774721427747447809[437] = 0; out_5774721427747447809[438] = 0; out_5774721427747447809[439] = 0; out_5774721427747447809[440] = 1; } void h_4(double *state, double *unused, double *out_1878806005493183204) { out_1878806005493183204[0] = state[10] + state[13]; out_1878806005493183204[1] = state[11] + state[14]; out_1878806005493183204[2] = state[12] + state[15]; } void H_4(double *state, double *unused, double *out_8360835986635707346) { out_8360835986635707346[0] = 0; out_8360835986635707346[1] = 0; out_8360835986635707346[2] = 0; out_8360835986635707346[3] = 0; out_8360835986635707346[4] = 0; out_8360835986635707346[5] = 0; out_8360835986635707346[6] = 0; out_8360835986635707346[7] = 0; out_8360835986635707346[8] = 0; out_8360835986635707346[9] = 0; out_8360835986635707346[10] = 1; out_8360835986635707346[11] = 0; out_8360835986635707346[12] = 0; out_8360835986635707346[13] = 1; out_8360835986635707346[14] = 0; out_8360835986635707346[15] = 0; out_8360835986635707346[16] = 0; out_8360835986635707346[17] = 0; out_8360835986635707346[18] = 0; out_8360835986635707346[19] = 0; out_8360835986635707346[20] = 0; out_8360835986635707346[21] = 0; out_8360835986635707346[22] = 0; out_8360835986635707346[23] = 0; out_8360835986635707346[24] = 0; out_8360835986635707346[25] = 0; out_8360835986635707346[26] = 0; out_8360835986635707346[27] = 0; out_8360835986635707346[28] = 0; out_8360835986635707346[29] = 0; out_8360835986635707346[30] = 0; out_8360835986635707346[31] = 0; out_8360835986635707346[32] = 0; out_8360835986635707346[33] = 1; out_8360835986635707346[34] = 0; out_8360835986635707346[35] = 0; out_8360835986635707346[36] = 1; out_8360835986635707346[37] = 0; out_8360835986635707346[38] = 0; out_8360835986635707346[39] = 0; out_8360835986635707346[40] = 0; out_8360835986635707346[41] = 0; out_8360835986635707346[42] = 0; out_8360835986635707346[43] = 0; out_8360835986635707346[44] = 0; out_8360835986635707346[45] = 0; out_8360835986635707346[46] = 0; out_8360835986635707346[47] = 0; out_8360835986635707346[48] = 0; out_8360835986635707346[49] = 0; out_8360835986635707346[50] = 0; out_8360835986635707346[51] = 0; out_8360835986635707346[52] = 0; out_8360835986635707346[53] = 0; out_8360835986635707346[54] = 0; out_8360835986635707346[55] = 0; out_8360835986635707346[56] = 1; out_8360835986635707346[57] = 0; out_8360835986635707346[58] = 0; out_8360835986635707346[59] = 1; out_8360835986635707346[60] = 0; out_8360835986635707346[61] = 0; out_8360835986635707346[62] = 0; out_8360835986635707346[63] = 0; out_8360835986635707346[64] = 0; out_8360835986635707346[65] = 0; } void h_9(double *state, double *unused, double *out_7008862357845565666) { out_7008862357845565666[0] = state[10]; out_7008862357845565666[1] = state[11]; out_7008862357845565666[2] = state[12]; } void H_9(double *state, double *unused, double *out_2798689151809396800) { out_2798689151809396800[0] = 0; out_2798689151809396800[1] = 0; out_2798689151809396800[2] = 0; out_2798689151809396800[3] = 0; out_2798689151809396800[4] = 0; out_2798689151809396800[5] = 0; out_2798689151809396800[6] = 0; out_2798689151809396800[7] = 0; out_2798689151809396800[8] = 0; out_2798689151809396800[9] = 0; out_2798689151809396800[10] = 1; out_2798689151809396800[11] = 0; out_2798689151809396800[12] = 0; out_2798689151809396800[13] = 0; out_2798689151809396800[14] = 0; out_2798689151809396800[15] = 0; out_2798689151809396800[16] = 0; out_2798689151809396800[17] = 0; out_2798689151809396800[18] = 0; out_2798689151809396800[19] = 0; out_2798689151809396800[20] = 0; out_2798689151809396800[21] = 0; out_2798689151809396800[22] = 0; out_2798689151809396800[23] = 0; out_2798689151809396800[24] = 0; out_2798689151809396800[25] = 0; out_2798689151809396800[26] = 0; out_2798689151809396800[27] = 0; out_2798689151809396800[28] = 0; out_2798689151809396800[29] = 0; out_2798689151809396800[30] = 0; out_2798689151809396800[31] = 0; out_2798689151809396800[32] = 0; out_2798689151809396800[33] = 1; out_2798689151809396800[34] = 0; out_2798689151809396800[35] = 0; out_2798689151809396800[36] = 0; out_2798689151809396800[37] = 0; out_2798689151809396800[38] = 0; out_2798689151809396800[39] = 0; out_2798689151809396800[40] = 0; out_2798689151809396800[41] = 0; out_2798689151809396800[42] = 0; out_2798689151809396800[43] = 0; out_2798689151809396800[44] = 0; out_2798689151809396800[45] = 0; out_2798689151809396800[46] = 0; out_2798689151809396800[47] = 0; out_2798689151809396800[48] = 0; out_2798689151809396800[49] = 0; out_2798689151809396800[50] = 0; out_2798689151809396800[51] = 0; out_2798689151809396800[52] = 0; out_2798689151809396800[53] = 0; out_2798689151809396800[54] = 0; out_2798689151809396800[55] = 0; out_2798689151809396800[56] = 1; out_2798689151809396800[57] = 0; out_2798689151809396800[58] = 0; out_2798689151809396800[59] = 0; out_2798689151809396800[60] = 0; out_2798689151809396800[61] = 0; out_2798689151809396800[62] = 0; out_2798689151809396800[63] = 0; out_2798689151809396800[64] = 0; out_2798689151809396800[65] = 0; } void h_10(double *state, double *unused, double *out_1854368242330831766) { out_1854368242330831766[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_1854368242330831766[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_1854368242330831766[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_7728768220624810382) { out_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[7] = 0; out_7728768220624810382[8] = 0; out_7728768220624810382[9] = 0; out_7728768220624810382[10] = 0; out_7728768220624810382[11] = 0; out_7728768220624810382[12] = 0; out_7728768220624810382[13] = 0; out_7728768220624810382[14] = 0; out_7728768220624810382[15] = 0; out_7728768220624810382[16] = 1; out_7728768220624810382[17] = 0; out_7728768220624810382[18] = 0; out_7728768220624810382[19] = 1; out_7728768220624810382[20] = 0; out_7728768220624810382[21] = 0; out_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[29] = 0; out_7728768220624810382[30] = 0; out_7728768220624810382[31] = 0; out_7728768220624810382[32] = 0; out_7728768220624810382[33] = 0; out_7728768220624810382[34] = 0; out_7728768220624810382[35] = 0; out_7728768220624810382[36] = 0; out_7728768220624810382[37] = 0; out_7728768220624810382[38] = 0; out_7728768220624810382[39] = 1; out_7728768220624810382[40] = 0; out_7728768220624810382[41] = 0; out_7728768220624810382[42] = 1; out_7728768220624810382[43] = 0; out_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[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_7728768220624810382[51] = 0; out_7728768220624810382[52] = 0; out_7728768220624810382[53] = 0; out_7728768220624810382[54] = 0; out_7728768220624810382[55] = 0; out_7728768220624810382[56] = 0; out_7728768220624810382[57] = 0; out_7728768220624810382[58] = 0; out_7728768220624810382[59] = 0; out_7728768220624810382[60] = 0; out_7728768220624810382[61] = 0; out_7728768220624810382[62] = 1; out_7728768220624810382[63] = 0; out_7728768220624810382[64] = 0; out_7728768220624810382[65] = 1; } void h_12(double *state, double *unused, double *out_5466497058915449734) { out_5466497058915449734[0] = state[0]; out_5466497058915449734[1] = state[1]; out_5466497058915449734[2] = state[2]; } void H_12(double *state, double *unused, double *out_5066451679041882475) { out_5066451679041882475[0] = 1; out_5066451679041882475[1] = 0; out_5066451679041882475[2] = 0; out_5066451679041882475[3] = 0; out_5066451679041882475[4] = 0; out_5066451679041882475[5] = 0; out_5066451679041882475[6] = 0; out_5066451679041882475[7] = 0; out_5066451679041882475[8] = 0; out_5066451679041882475[9] = 0; out_5066451679041882475[10] = 0; out_5066451679041882475[11] = 0; out_5066451679041882475[12] = 0; out_5066451679041882475[13] = 0; out_5066451679041882475[14] = 0; out_5066451679041882475[15] = 0; out_5066451679041882475[16] = 0; out_5066451679041882475[17] = 0; out_5066451679041882475[18] = 0; out_5066451679041882475[19] = 0; out_5066451679041882475[20] = 0; out_5066451679041882475[21] = 0; out_5066451679041882475[22] = 0; out_5066451679041882475[23] = 1; out_5066451679041882475[24] = 0; out_5066451679041882475[25] = 0; out_5066451679041882475[26] = 0; out_5066451679041882475[27] = 0; out_5066451679041882475[28] = 0; out_5066451679041882475[29] = 0; out_5066451679041882475[30] = 0; out_5066451679041882475[31] = 0; out_5066451679041882475[32] = 0; out_5066451679041882475[33] = 0; out_5066451679041882475[34] = 0; out_5066451679041882475[35] = 0; out_5066451679041882475[36] = 0; out_5066451679041882475[37] = 0; out_5066451679041882475[38] = 0; out_5066451679041882475[39] = 0; out_5066451679041882475[40] = 0; out_5066451679041882475[41] = 0; out_5066451679041882475[42] = 0; out_5066451679041882475[43] = 0; out_5066451679041882475[44] = 0; out_5066451679041882475[45] = 0; out_5066451679041882475[46] = 1; out_5066451679041882475[47] = 0; out_5066451679041882475[48] = 0; out_5066451679041882475[49] = 0; out_5066451679041882475[50] = 0; out_5066451679041882475[51] = 0; out_5066451679041882475[52] = 0; out_5066451679041882475[53] = 0; out_5066451679041882475[54] = 0; out_5066451679041882475[55] = 0; out_5066451679041882475[56] = 0; out_5066451679041882475[57] = 0; out_5066451679041882475[58] = 0; out_5066451679041882475[59] = 0; out_5066451679041882475[60] = 0; out_5066451679041882475[61] = 0; out_5066451679041882475[62] = 0; out_5066451679041882475[63] = 0; out_5066451679041882475[64] = 0; out_5066451679041882475[65] = 0; } void h_35(double *state, double *unused, double *out_4931523598679842869) { out_4931523598679842869[0] = state[7]; out_4931523598679842869[1] = state[8]; out_4931523598679842869[2] = state[9]; } void H_35(double *state, double *unused, double *out_6719246029701236894) { out_6719246029701236894[0] = 0; out_6719246029701236894[1] = 0; out_6719246029701236894[2] = 0; out_6719246029701236894[3] = 0; out_6719246029701236894[4] = 0; out_6719246029701236894[5] = 0; out_6719246029701236894[6] = 0; out_6719246029701236894[7] = 1; out_6719246029701236894[8] = 0; out_6719246029701236894[9] = 0; out_6719246029701236894[10] = 0; out_6719246029701236894[11] = 0; out_6719246029701236894[12] = 0; out_6719246029701236894[13] = 0; out_6719246029701236894[14] = 0; out_6719246029701236894[15] = 0; out_6719246029701236894[16] = 0; out_6719246029701236894[17] = 0; out_6719246029701236894[18] = 0; out_6719246029701236894[19] = 0; out_6719246029701236894[20] = 0; out_6719246029701236894[21] = 0; out_6719246029701236894[22] = 0; out_6719246029701236894[23] = 0; out_6719246029701236894[24] = 0; out_6719246029701236894[25] = 0; out_6719246029701236894[26] = 0; out_6719246029701236894[27] = 0; out_6719246029701236894[28] = 0; out_6719246029701236894[29] = 0; out_6719246029701236894[30] = 1; out_6719246029701236894[31] = 0; out_6719246029701236894[32] = 0; out_6719246029701236894[33] = 0; out_6719246029701236894[34] = 0; out_6719246029701236894[35] = 0; out_6719246029701236894[36] = 0; out_6719246029701236894[37] = 0; out_6719246029701236894[38] = 0; out_6719246029701236894[39] = 0; out_6719246029701236894[40] = 0; out_6719246029701236894[41] = 0; out_6719246029701236894[42] = 0; out_6719246029701236894[43] = 0; out_6719246029701236894[44] = 0; out_6719246029701236894[45] = 0; out_6719246029701236894[46] = 0; out_6719246029701236894[47] = 0; out_6719246029701236894[48] = 0; out_6719246029701236894[49] = 0; out_6719246029701236894[50] = 0; out_6719246029701236894[51] = 0; out_6719246029701236894[52] = 0; out_6719246029701236894[53] = 1; out_6719246029701236894[54] = 0; out_6719246029701236894[55] = 0; out_6719246029701236894[56] = 0; out_6719246029701236894[57] = 0; out_6719246029701236894[58] = 0; out_6719246029701236894[59] = 0; out_6719246029701236894[60] = 0; out_6719246029701236894[61] = 0; out_6719246029701236894[62] = 0; out_6719246029701236894[63] = 0; out_6719246029701236894[64] = 0; out_6719246029701236894[65] = 0; } void h_32(double *state, double *unused, double *out_2039644813621010602) { out_2039644813621010602[0] = state[3]; out_2039644813621010602[1] = state[4]; out_2039644813621010602[2] = state[5]; out_2039644813621010602[3] = state[6]; } void H_32(double *state, double *unused, double *out_6588081244760496425) { out_6588081244760496425[0] = 0; out_6588081244760496425[1] = 0; out_6588081244760496425[2] = 0; out_6588081244760496425[3] = 1; out_6588081244760496425[4] = 0; out_6588081244760496425[5] = 0; out_6588081244760496425[6] = 0; out_6588081244760496425[7] = 0; out_6588081244760496425[8] = 0; out_6588081244760496425[9] = 0; out_6588081244760496425[10] = 0; out_6588081244760496425[11] = 0; out_6588081244760496425[12] = 0; out_6588081244760496425[13] = 0; out_6588081244760496425[14] = 0; out_6588081244760496425[15] = 0; out_6588081244760496425[16] = 0; out_6588081244760496425[17] = 0; out_6588081244760496425[18] = 0; out_6588081244760496425[19] = 0; out_6588081244760496425[20] = 0; out_6588081244760496425[21] = 0; out_6588081244760496425[22] = 0; out_6588081244760496425[23] = 0; out_6588081244760496425[24] = 0; out_6588081244760496425[25] = 0; out_6588081244760496425[26] = 1; out_6588081244760496425[27] = 0; out_6588081244760496425[28] = 0; out_6588081244760496425[29] = 0; out_6588081244760496425[30] = 0; out_6588081244760496425[31] = 0; out_6588081244760496425[32] = 0; out_6588081244760496425[33] = 0; out_6588081244760496425[34] = 0; out_6588081244760496425[35] = 0; out_6588081244760496425[36] = 0; out_6588081244760496425[37] = 0; out_6588081244760496425[38] = 0; out_6588081244760496425[39] = 0; out_6588081244760496425[40] = 0; out_6588081244760496425[41] = 0; out_6588081244760496425[42] = 0; out_6588081244760496425[43] = 0; out_6588081244760496425[44] = 0; out_6588081244760496425[45] = 0; out_6588081244760496425[46] = 0; out_6588081244760496425[47] = 0; out_6588081244760496425[48] = 0; out_6588081244760496425[49] = 1; out_6588081244760496425[50] = 0; out_6588081244760496425[51] = 0; out_6588081244760496425[52] = 0; out_6588081244760496425[53] = 0; out_6588081244760496425[54] = 0; out_6588081244760496425[55] = 0; out_6588081244760496425[56] = 0; out_6588081244760496425[57] = 0; out_6588081244760496425[58] = 0; out_6588081244760496425[59] = 0; out_6588081244760496425[60] = 0; out_6588081244760496425[61] = 0; out_6588081244760496425[62] = 0; out_6588081244760496425[63] = 0; out_6588081244760496425[64] = 0; out_6588081244760496425[65] = 0; out_6588081244760496425[66] = 0; out_6588081244760496425[67] = 0; out_6588081244760496425[68] = 0; out_6588081244760496425[69] = 0; out_6588081244760496425[70] = 0; out_6588081244760496425[71] = 0; out_6588081244760496425[72] = 1; out_6588081244760496425[73] = 0; out_6588081244760496425[74] = 0; out_6588081244760496425[75] = 0; out_6588081244760496425[76] = 0; out_6588081244760496425[77] = 0; out_6588081244760496425[78] = 0; out_6588081244760496425[79] = 0; out_6588081244760496425[80] = 0; out_6588081244760496425[81] = 0; out_6588081244760496425[82] = 0; out_6588081244760496425[83] = 0; out_6588081244760496425[84] = 0; out_6588081244760496425[85] = 0; out_6588081244760496425[86] = 0; out_6588081244760496425[87] = 0; } void h_13(double *state, double *unused, double *out_3593629792265566351) { out_3593629792265566351[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_3593629792265566351[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_3593629792265566351[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_242337613300384717) { out_242337613300384717[0] = 0; out_242337613300384717[1] = 0; out_242337613300384717[2] = 0; out_242337613300384717[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; out_242337613300384717[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_242337613300384717[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; out_242337613300384717[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; out_242337613300384717[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); out_242337613300384717[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; out_242337613300384717[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; out_242337613300384717[10] = 0; out_242337613300384717[11] = 0; out_242337613300384717[12] = 0; out_242337613300384717[13] = 0; out_242337613300384717[14] = 0; out_242337613300384717[15] = 0; out_242337613300384717[16] = 0; out_242337613300384717[17] = 0; out_242337613300384717[18] = 0; out_242337613300384717[19] = 0; out_242337613300384717[20] = 0; out_242337613300384717[21] = 0; out_242337613300384717[22] = 0; out_242337613300384717[23] = 0; out_242337613300384717[24] = 0; out_242337613300384717[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; out_242337613300384717[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; out_242337613300384717[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_242337613300384717[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; out_242337613300384717[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; out_242337613300384717[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); out_242337613300384717[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; out_242337613300384717[32] = 0; out_242337613300384717[33] = 0; out_242337613300384717[34] = 0; out_242337613300384717[35] = 0; out_242337613300384717[36] = 0; out_242337613300384717[37] = 0; out_242337613300384717[38] = 0; out_242337613300384717[39] = 0; out_242337613300384717[40] = 0; out_242337613300384717[41] = 0; out_242337613300384717[42] = 0; out_242337613300384717[43] = 0; out_242337613300384717[44] = 0; out_242337613300384717[45] = 0; out_242337613300384717[46] = 0; out_242337613300384717[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; out_242337613300384717[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; out_242337613300384717[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; out_242337613300384717[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; out_242337613300384717[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; out_242337613300384717[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; out_242337613300384717[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); out_242337613300384717[54] = 0; out_242337613300384717[55] = 0; out_242337613300384717[56] = 0; out_242337613300384717[57] = 0; out_242337613300384717[58] = 0; out_242337613300384717[59] = 0; out_242337613300384717[60] = 0; out_242337613300384717[61] = 0; out_242337613300384717[62] = 0; out_242337613300384717[63] = 0; out_242337613300384717[64] = 0; out_242337613300384717[65] = 0; } void h_14(double *state, double *unused, double *out_7008862357845565666) { out_7008862357845565666[0] = state[10]; out_7008862357845565666[1] = state[11]; out_7008862357845565666[2] = state[12]; } void H_14(double *state, double *unused, double *out_2798689151809396800) { out_2798689151809396800[0] = 0; out_2798689151809396800[1] = 0; out_2798689151809396800[2] = 0; out_2798689151809396800[3] = 0; out_2798689151809396800[4] = 0; out_2798689151809396800[5] = 0; out_2798689151809396800[6] = 0; out_2798689151809396800[7] = 0; out_2798689151809396800[8] = 0; out_2798689151809396800[9] = 0; out_2798689151809396800[10] = 1; out_2798689151809396800[11] = 0; out_2798689151809396800[12] = 0; out_2798689151809396800[13] = 0; out_2798689151809396800[14] = 0; out_2798689151809396800[15] = 0; out_2798689151809396800[16] = 0; out_2798689151809396800[17] = 0; out_2798689151809396800[18] = 0; out_2798689151809396800[19] = 0; out_2798689151809396800[20] = 0; out_2798689151809396800[21] = 0; out_2798689151809396800[22] = 0; out_2798689151809396800[23] = 0; out_2798689151809396800[24] = 0; out_2798689151809396800[25] = 0; out_2798689151809396800[26] = 0; out_2798689151809396800[27] = 0; out_2798689151809396800[28] = 0; out_2798689151809396800[29] = 0; out_2798689151809396800[30] = 0; out_2798689151809396800[31] = 0; out_2798689151809396800[32] = 0; out_2798689151809396800[33] = 1; out_2798689151809396800[34] = 0; out_2798689151809396800[35] = 0; out_2798689151809396800[36] = 0; out_2798689151809396800[37] = 0; out_2798689151809396800[38] = 0; out_2798689151809396800[39] = 0; out_2798689151809396800[40] = 0; out_2798689151809396800[41] = 0; out_2798689151809396800[42] = 0; out_2798689151809396800[43] = 0; out_2798689151809396800[44] = 0; out_2798689151809396800[45] = 0; out_2798689151809396800[46] = 0; out_2798689151809396800[47] = 0; out_2798689151809396800[48] = 0; out_2798689151809396800[49] = 0; out_2798689151809396800[50] = 0; out_2798689151809396800[51] = 0; out_2798689151809396800[52] = 0; out_2798689151809396800[53] = 0; out_2798689151809396800[54] = 0; out_2798689151809396800[55] = 0; out_2798689151809396800[56] = 1; out_2798689151809396800[57] = 0; out_2798689151809396800[58] = 0; out_2798689151809396800[59] = 0; out_2798689151809396800[60] = 0; out_2798689151809396800[61] = 0; out_2798689151809396800[62] = 0; out_2798689151809396800[63] = 0; out_2798689151809396800[64] = 0; out_2798689151809396800[65] = 0; } void h_33(double *state, double *unused, double *out_4589975723008195621) { out_4589975723008195621[0] = state[16]; out_4589975723008195621[1] = state[17]; out_4589975723008195621[2] = state[18]; } void H_33(double *state, double *unused, double *out_3568689025062379290) { out_3568689025062379290[0] = 0; out_3568689025062379290[1] = 0; out_3568689025062379290[2] = 0; out_3568689025062379290[3] = 0; out_3568689025062379290[4] = 0; out_3568689025062379290[5] = 0; out_3568689025062379290[6] = 0; out_3568689025062379290[7] = 0; out_3568689025062379290[8] = 0; out_3568689025062379290[9] = 0; out_3568689025062379290[10] = 0; out_3568689025062379290[11] = 0; out_3568689025062379290[12] = 0; out_3568689025062379290[13] = 0; out_3568689025062379290[14] = 0; out_3568689025062379290[15] = 0; out_3568689025062379290[16] = 1; out_3568689025062379290[17] = 0; out_3568689025062379290[18] = 0; out_3568689025062379290[19] = 0; out_3568689025062379290[20] = 0; out_3568689025062379290[21] = 0; out_3568689025062379290[22] = 0; out_3568689025062379290[23] = 0; out_3568689025062379290[24] = 0; out_3568689025062379290[25] = 0; out_3568689025062379290[26] = 0; out_3568689025062379290[27] = 0; out_3568689025062379290[28] = 0; out_3568689025062379290[29] = 0; out_3568689025062379290[30] = 0; out_3568689025062379290[31] = 0; out_3568689025062379290[32] = 0; out_3568689025062379290[33] = 0; out_3568689025062379290[34] = 0; out_3568689025062379290[35] = 0; out_3568689025062379290[36] = 0; out_3568689025062379290[37] = 0; out_3568689025062379290[38] = 0; out_3568689025062379290[39] = 1; out_3568689025062379290[40] = 0; out_3568689025062379290[41] = 0; out_3568689025062379290[42] = 0; out_3568689025062379290[43] = 0; out_3568689025062379290[44] = 0; out_3568689025062379290[45] = 0; out_3568689025062379290[46] = 0; out_3568689025062379290[47] = 0; out_3568689025062379290[48] = 0; out_3568689025062379290[49] = 0; out_3568689025062379290[50] = 0; out_3568689025062379290[51] = 0; out_3568689025062379290[52] = 0; out_3568689025062379290[53] = 0; out_3568689025062379290[54] = 0; out_3568689025062379290[55] = 0; out_3568689025062379290[56] = 0; out_3568689025062379290[57] = 0; out_3568689025062379290[58] = 0; out_3568689025062379290[59] = 0; out_3568689025062379290[60] = 0; out_3568689025062379290[61] = 0; out_3568689025062379290[62] = 1; out_3568689025062379290[63] = 0; out_3568689025062379290[64] = 0; out_3568689025062379290[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_5678547249781205843) { H(in_vec, out_5678547249781205843); } void live_err_fun(double *nom_x, double *delta_x, double *out_7786038415114058898) { err_fun(nom_x, delta_x, out_7786038415114058898); } void live_inv_err_fun(double *nom_x, double *true_x, double *out_4024320067273853194) { inv_err_fun(nom_x, true_x, out_4024320067273853194); } void live_H_mod_fun(double *state, double *out_5397558725730410635) { H_mod_fun(state, out_5397558725730410635); } void live_f_fun(double *state, double dt, double *out_4167526640936982777) { f_fun(state, dt, out_4167526640936982777); } void live_F_fun(double *state, double dt, double *out_5774721427747447809) { F_fun(state, dt, out_5774721427747447809); } void live_h_4(double *state, double *unused, double *out_1878806005493183204) { h_4(state, unused, out_1878806005493183204); } void live_H_4(double *state, double *unused, double *out_8360835986635707346) { H_4(state, unused, out_8360835986635707346); } void live_h_9(double *state, double *unused, double *out_7008862357845565666) { h_9(state, unused, out_7008862357845565666); } void live_H_9(double *state, double *unused, double *out_2798689151809396800) { H_9(state, unused, out_2798689151809396800); } void live_h_10(double *state, double *unused, double *out_1854368242330831766) { h_10(state, unused, out_1854368242330831766); } void live_H_10(double *state, double *unused, double *out_7728768220624810382) { H_10(state, unused, out_7728768220624810382); } void live_h_12(double *state, double *unused, double *out_5466497058915449734) { h_12(state, unused, out_5466497058915449734); } void live_H_12(double *state, double *unused, double *out_5066451679041882475) { H_12(state, unused, out_5066451679041882475); } void live_h_35(double *state, double *unused, double *out_4931523598679842869) { h_35(state, unused, out_4931523598679842869); } void live_H_35(double *state, double *unused, double *out_6719246029701236894) { H_35(state, unused, out_6719246029701236894); } void live_h_32(double *state, double *unused, double *out_2039644813621010602) { h_32(state, unused, out_2039644813621010602); } void live_H_32(double *state, double *unused, double *out_6588081244760496425) { H_32(state, unused, out_6588081244760496425); } void live_h_13(double *state, double *unused, double *out_3593629792265566351) { h_13(state, unused, out_3593629792265566351); } void live_H_13(double *state, double *unused, double *out_242337613300384717) { H_13(state, unused, out_242337613300384717); } void live_h_14(double *state, double *unused, double *out_7008862357845565666) { h_14(state, unused, out_7008862357845565666); } void live_H_14(double *state, double *unused, double *out_2798689151809396800) { H_14(state, unused, out_2798689151809396800); } void live_h_33(double *state, double *unused, double *out_4589975723008195621) { h_33(state, unused, out_4589975723008195621); } void live_H_33(double *state, double *unused, double *out_3568689025062379290) { H_33(state, unused, out_3568689025062379290); } 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)