Files
Comma Device a21f07384b 2026-6-7
2026-06-07 02:40:07 +00:00

1988 lines
91 KiB
C++

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