mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-23 00:53:43 +08:00
Powers You Never Knew You Had and What To Do With Them Now You've Wised Up
This commit is contained in:
@@ -45,326 +45,326 @@ const static double MAHA_THRESH_31 = 3.8414588206941227;
|
||||
* *
|
||||
* This file is part of 'ekf' *
|
||||
******************************************************************************/
|
||||
void err_fun(double *nom_x, double *delta_x, double *out_7026316075073471994) {
|
||||
out_7026316075073471994[0] = delta_x[0] + nom_x[0];
|
||||
out_7026316075073471994[1] = delta_x[1] + nom_x[1];
|
||||
out_7026316075073471994[2] = delta_x[2] + nom_x[2];
|
||||
out_7026316075073471994[3] = delta_x[3] + nom_x[3];
|
||||
out_7026316075073471994[4] = delta_x[4] + nom_x[4];
|
||||
out_7026316075073471994[5] = delta_x[5] + nom_x[5];
|
||||
out_7026316075073471994[6] = delta_x[6] + nom_x[6];
|
||||
out_7026316075073471994[7] = delta_x[7] + nom_x[7];
|
||||
out_7026316075073471994[8] = delta_x[8] + nom_x[8];
|
||||
void err_fun(double *nom_x, double *delta_x, double *out_2249508041139738373) {
|
||||
out_2249508041139738373[0] = delta_x[0] + nom_x[0];
|
||||
out_2249508041139738373[1] = delta_x[1] + nom_x[1];
|
||||
out_2249508041139738373[2] = delta_x[2] + nom_x[2];
|
||||
out_2249508041139738373[3] = delta_x[3] + nom_x[3];
|
||||
out_2249508041139738373[4] = delta_x[4] + nom_x[4];
|
||||
out_2249508041139738373[5] = delta_x[5] + nom_x[5];
|
||||
out_2249508041139738373[6] = delta_x[6] + nom_x[6];
|
||||
out_2249508041139738373[7] = delta_x[7] + nom_x[7];
|
||||
out_2249508041139738373[8] = delta_x[8] + nom_x[8];
|
||||
}
|
||||
void inv_err_fun(double *nom_x, double *true_x, double *out_4587773260780687079) {
|
||||
out_4587773260780687079[0] = -nom_x[0] + true_x[0];
|
||||
out_4587773260780687079[1] = -nom_x[1] + true_x[1];
|
||||
out_4587773260780687079[2] = -nom_x[2] + true_x[2];
|
||||
out_4587773260780687079[3] = -nom_x[3] + true_x[3];
|
||||
out_4587773260780687079[4] = -nom_x[4] + true_x[4];
|
||||
out_4587773260780687079[5] = -nom_x[5] + true_x[5];
|
||||
out_4587773260780687079[6] = -nom_x[6] + true_x[6];
|
||||
out_4587773260780687079[7] = -nom_x[7] + true_x[7];
|
||||
out_4587773260780687079[8] = -nom_x[8] + true_x[8];
|
||||
void inv_err_fun(double *nom_x, double *true_x, double *out_4788524825292355547) {
|
||||
out_4788524825292355547[0] = -nom_x[0] + true_x[0];
|
||||
out_4788524825292355547[1] = -nom_x[1] + true_x[1];
|
||||
out_4788524825292355547[2] = -nom_x[2] + true_x[2];
|
||||
out_4788524825292355547[3] = -nom_x[3] + true_x[3];
|
||||
out_4788524825292355547[4] = -nom_x[4] + true_x[4];
|
||||
out_4788524825292355547[5] = -nom_x[5] + true_x[5];
|
||||
out_4788524825292355547[6] = -nom_x[6] + true_x[6];
|
||||
out_4788524825292355547[7] = -nom_x[7] + true_x[7];
|
||||
out_4788524825292355547[8] = -nom_x[8] + true_x[8];
|
||||
}
|
||||
void H_mod_fun(double *state, double *out_255548955770617621) {
|
||||
out_255548955770617621[0] = 1.0;
|
||||
out_255548955770617621[1] = 0.0;
|
||||
out_255548955770617621[2] = 0.0;
|
||||
out_255548955770617621[3] = 0.0;
|
||||
out_255548955770617621[4] = 0.0;
|
||||
out_255548955770617621[5] = 0.0;
|
||||
out_255548955770617621[6] = 0.0;
|
||||
out_255548955770617621[7] = 0.0;
|
||||
out_255548955770617621[8] = 0.0;
|
||||
out_255548955770617621[9] = 0.0;
|
||||
out_255548955770617621[10] = 1.0;
|
||||
out_255548955770617621[11] = 0.0;
|
||||
out_255548955770617621[12] = 0.0;
|
||||
out_255548955770617621[13] = 0.0;
|
||||
out_255548955770617621[14] = 0.0;
|
||||
out_255548955770617621[15] = 0.0;
|
||||
out_255548955770617621[16] = 0.0;
|
||||
out_255548955770617621[17] = 0.0;
|
||||
out_255548955770617621[18] = 0.0;
|
||||
out_255548955770617621[19] = 0.0;
|
||||
out_255548955770617621[20] = 1.0;
|
||||
out_255548955770617621[21] = 0.0;
|
||||
out_255548955770617621[22] = 0.0;
|
||||
out_255548955770617621[23] = 0.0;
|
||||
out_255548955770617621[24] = 0.0;
|
||||
out_255548955770617621[25] = 0.0;
|
||||
out_255548955770617621[26] = 0.0;
|
||||
out_255548955770617621[27] = 0.0;
|
||||
out_255548955770617621[28] = 0.0;
|
||||
out_255548955770617621[29] = 0.0;
|
||||
out_255548955770617621[30] = 1.0;
|
||||
out_255548955770617621[31] = 0.0;
|
||||
out_255548955770617621[32] = 0.0;
|
||||
out_255548955770617621[33] = 0.0;
|
||||
out_255548955770617621[34] = 0.0;
|
||||
out_255548955770617621[35] = 0.0;
|
||||
out_255548955770617621[36] = 0.0;
|
||||
out_255548955770617621[37] = 0.0;
|
||||
out_255548955770617621[38] = 0.0;
|
||||
out_255548955770617621[39] = 0.0;
|
||||
out_255548955770617621[40] = 1.0;
|
||||
out_255548955770617621[41] = 0.0;
|
||||
out_255548955770617621[42] = 0.0;
|
||||
out_255548955770617621[43] = 0.0;
|
||||
out_255548955770617621[44] = 0.0;
|
||||
out_255548955770617621[45] = 0.0;
|
||||
out_255548955770617621[46] = 0.0;
|
||||
out_255548955770617621[47] = 0.0;
|
||||
out_255548955770617621[48] = 0.0;
|
||||
out_255548955770617621[49] = 0.0;
|
||||
out_255548955770617621[50] = 1.0;
|
||||
out_255548955770617621[51] = 0.0;
|
||||
out_255548955770617621[52] = 0.0;
|
||||
out_255548955770617621[53] = 0.0;
|
||||
out_255548955770617621[54] = 0.0;
|
||||
out_255548955770617621[55] = 0.0;
|
||||
out_255548955770617621[56] = 0.0;
|
||||
out_255548955770617621[57] = 0.0;
|
||||
out_255548955770617621[58] = 0.0;
|
||||
out_255548955770617621[59] = 0.0;
|
||||
out_255548955770617621[60] = 1.0;
|
||||
out_255548955770617621[61] = 0.0;
|
||||
out_255548955770617621[62] = 0.0;
|
||||
out_255548955770617621[63] = 0.0;
|
||||
out_255548955770617621[64] = 0.0;
|
||||
out_255548955770617621[65] = 0.0;
|
||||
out_255548955770617621[66] = 0.0;
|
||||
out_255548955770617621[67] = 0.0;
|
||||
out_255548955770617621[68] = 0.0;
|
||||
out_255548955770617621[69] = 0.0;
|
||||
out_255548955770617621[70] = 1.0;
|
||||
out_255548955770617621[71] = 0.0;
|
||||
out_255548955770617621[72] = 0.0;
|
||||
out_255548955770617621[73] = 0.0;
|
||||
out_255548955770617621[74] = 0.0;
|
||||
out_255548955770617621[75] = 0.0;
|
||||
out_255548955770617621[76] = 0.0;
|
||||
out_255548955770617621[77] = 0.0;
|
||||
out_255548955770617621[78] = 0.0;
|
||||
out_255548955770617621[79] = 0.0;
|
||||
out_255548955770617621[80] = 1.0;
|
||||
void H_mod_fun(double *state, double *out_5143375091155045702) {
|
||||
out_5143375091155045702[0] = 1.0;
|
||||
out_5143375091155045702[1] = 0.0;
|
||||
out_5143375091155045702[2] = 0.0;
|
||||
out_5143375091155045702[3] = 0.0;
|
||||
out_5143375091155045702[4] = 0.0;
|
||||
out_5143375091155045702[5] = 0.0;
|
||||
out_5143375091155045702[6] = 0.0;
|
||||
out_5143375091155045702[7] = 0.0;
|
||||
out_5143375091155045702[8] = 0.0;
|
||||
out_5143375091155045702[9] = 0.0;
|
||||
out_5143375091155045702[10] = 1.0;
|
||||
out_5143375091155045702[11] = 0.0;
|
||||
out_5143375091155045702[12] = 0.0;
|
||||
out_5143375091155045702[13] = 0.0;
|
||||
out_5143375091155045702[14] = 0.0;
|
||||
out_5143375091155045702[15] = 0.0;
|
||||
out_5143375091155045702[16] = 0.0;
|
||||
out_5143375091155045702[17] = 0.0;
|
||||
out_5143375091155045702[18] = 0.0;
|
||||
out_5143375091155045702[19] = 0.0;
|
||||
out_5143375091155045702[20] = 1.0;
|
||||
out_5143375091155045702[21] = 0.0;
|
||||
out_5143375091155045702[22] = 0.0;
|
||||
out_5143375091155045702[23] = 0.0;
|
||||
out_5143375091155045702[24] = 0.0;
|
||||
out_5143375091155045702[25] = 0.0;
|
||||
out_5143375091155045702[26] = 0.0;
|
||||
out_5143375091155045702[27] = 0.0;
|
||||
out_5143375091155045702[28] = 0.0;
|
||||
out_5143375091155045702[29] = 0.0;
|
||||
out_5143375091155045702[30] = 1.0;
|
||||
out_5143375091155045702[31] = 0.0;
|
||||
out_5143375091155045702[32] = 0.0;
|
||||
out_5143375091155045702[33] = 0.0;
|
||||
out_5143375091155045702[34] = 0.0;
|
||||
out_5143375091155045702[35] = 0.0;
|
||||
out_5143375091155045702[36] = 0.0;
|
||||
out_5143375091155045702[37] = 0.0;
|
||||
out_5143375091155045702[38] = 0.0;
|
||||
out_5143375091155045702[39] = 0.0;
|
||||
out_5143375091155045702[40] = 1.0;
|
||||
out_5143375091155045702[41] = 0.0;
|
||||
out_5143375091155045702[42] = 0.0;
|
||||
out_5143375091155045702[43] = 0.0;
|
||||
out_5143375091155045702[44] = 0.0;
|
||||
out_5143375091155045702[45] = 0.0;
|
||||
out_5143375091155045702[46] = 0.0;
|
||||
out_5143375091155045702[47] = 0.0;
|
||||
out_5143375091155045702[48] = 0.0;
|
||||
out_5143375091155045702[49] = 0.0;
|
||||
out_5143375091155045702[50] = 1.0;
|
||||
out_5143375091155045702[51] = 0.0;
|
||||
out_5143375091155045702[52] = 0.0;
|
||||
out_5143375091155045702[53] = 0.0;
|
||||
out_5143375091155045702[54] = 0.0;
|
||||
out_5143375091155045702[55] = 0.0;
|
||||
out_5143375091155045702[56] = 0.0;
|
||||
out_5143375091155045702[57] = 0.0;
|
||||
out_5143375091155045702[58] = 0.0;
|
||||
out_5143375091155045702[59] = 0.0;
|
||||
out_5143375091155045702[60] = 1.0;
|
||||
out_5143375091155045702[61] = 0.0;
|
||||
out_5143375091155045702[62] = 0.0;
|
||||
out_5143375091155045702[63] = 0.0;
|
||||
out_5143375091155045702[64] = 0.0;
|
||||
out_5143375091155045702[65] = 0.0;
|
||||
out_5143375091155045702[66] = 0.0;
|
||||
out_5143375091155045702[67] = 0.0;
|
||||
out_5143375091155045702[68] = 0.0;
|
||||
out_5143375091155045702[69] = 0.0;
|
||||
out_5143375091155045702[70] = 1.0;
|
||||
out_5143375091155045702[71] = 0.0;
|
||||
out_5143375091155045702[72] = 0.0;
|
||||
out_5143375091155045702[73] = 0.0;
|
||||
out_5143375091155045702[74] = 0.0;
|
||||
out_5143375091155045702[75] = 0.0;
|
||||
out_5143375091155045702[76] = 0.0;
|
||||
out_5143375091155045702[77] = 0.0;
|
||||
out_5143375091155045702[78] = 0.0;
|
||||
out_5143375091155045702[79] = 0.0;
|
||||
out_5143375091155045702[80] = 1.0;
|
||||
}
|
||||
void f_fun(double *state, double dt, double *out_5905678958362697737) {
|
||||
out_5905678958362697737[0] = state[0];
|
||||
out_5905678958362697737[1] = state[1];
|
||||
out_5905678958362697737[2] = state[2];
|
||||
out_5905678958362697737[3] = state[3];
|
||||
out_5905678958362697737[4] = state[4];
|
||||
out_5905678958362697737[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8100000000000005*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5];
|
||||
out_5905678958362697737[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6];
|
||||
out_5905678958362697737[7] = state[7];
|
||||
out_5905678958362697737[8] = state[8];
|
||||
void f_fun(double *state, double dt, double *out_223721292699517100) {
|
||||
out_223721292699517100[0] = state[0];
|
||||
out_223721292699517100[1] = state[1];
|
||||
out_223721292699517100[2] = state[2];
|
||||
out_223721292699517100[3] = state[3];
|
||||
out_223721292699517100[4] = state[4];
|
||||
out_223721292699517100[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8100000000000005*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5];
|
||||
out_223721292699517100[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6];
|
||||
out_223721292699517100[7] = state[7];
|
||||
out_223721292699517100[8] = state[8];
|
||||
}
|
||||
void F_fun(double *state, double dt, double *out_2348542156060617804) {
|
||||
out_2348542156060617804[0] = 1;
|
||||
out_2348542156060617804[1] = 0;
|
||||
out_2348542156060617804[2] = 0;
|
||||
out_2348542156060617804[3] = 0;
|
||||
out_2348542156060617804[4] = 0;
|
||||
out_2348542156060617804[5] = 0;
|
||||
out_2348542156060617804[6] = 0;
|
||||
out_2348542156060617804[7] = 0;
|
||||
out_2348542156060617804[8] = 0;
|
||||
out_2348542156060617804[9] = 0;
|
||||
out_2348542156060617804[10] = 1;
|
||||
out_2348542156060617804[11] = 0;
|
||||
out_2348542156060617804[12] = 0;
|
||||
out_2348542156060617804[13] = 0;
|
||||
out_2348542156060617804[14] = 0;
|
||||
out_2348542156060617804[15] = 0;
|
||||
out_2348542156060617804[16] = 0;
|
||||
out_2348542156060617804[17] = 0;
|
||||
out_2348542156060617804[18] = 0;
|
||||
out_2348542156060617804[19] = 0;
|
||||
out_2348542156060617804[20] = 1;
|
||||
out_2348542156060617804[21] = 0;
|
||||
out_2348542156060617804[22] = 0;
|
||||
out_2348542156060617804[23] = 0;
|
||||
out_2348542156060617804[24] = 0;
|
||||
out_2348542156060617804[25] = 0;
|
||||
out_2348542156060617804[26] = 0;
|
||||
out_2348542156060617804[27] = 0;
|
||||
out_2348542156060617804[28] = 0;
|
||||
out_2348542156060617804[29] = 0;
|
||||
out_2348542156060617804[30] = 1;
|
||||
out_2348542156060617804[31] = 0;
|
||||
out_2348542156060617804[32] = 0;
|
||||
out_2348542156060617804[33] = 0;
|
||||
out_2348542156060617804[34] = 0;
|
||||
out_2348542156060617804[35] = 0;
|
||||
out_2348542156060617804[36] = 0;
|
||||
out_2348542156060617804[37] = 0;
|
||||
out_2348542156060617804[38] = 0;
|
||||
out_2348542156060617804[39] = 0;
|
||||
out_2348542156060617804[40] = 1;
|
||||
out_2348542156060617804[41] = 0;
|
||||
out_2348542156060617804[42] = 0;
|
||||
out_2348542156060617804[43] = 0;
|
||||
out_2348542156060617804[44] = 0;
|
||||
out_2348542156060617804[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4]));
|
||||
out_2348542156060617804[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2));
|
||||
out_2348542156060617804[47] = -dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_2348542156060617804[48] = -dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_2348542156060617804[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2)));
|
||||
out_2348542156060617804[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1;
|
||||
out_2348542156060617804[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]));
|
||||
out_2348542156060617804[52] = dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_2348542156060617804[53] = -9.8100000000000005*dt;
|
||||
out_2348542156060617804[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4]));
|
||||
out_2348542156060617804[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
|
||||
out_2348542156060617804[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_2348542156060617804[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_2348542156060617804[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2)));
|
||||
out_2348542156060617804[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
|
||||
out_2348542156060617804[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1;
|
||||
out_2348542156060617804[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_2348542156060617804[62] = 0;
|
||||
out_2348542156060617804[63] = 0;
|
||||
out_2348542156060617804[64] = 0;
|
||||
out_2348542156060617804[65] = 0;
|
||||
out_2348542156060617804[66] = 0;
|
||||
out_2348542156060617804[67] = 0;
|
||||
out_2348542156060617804[68] = 0;
|
||||
out_2348542156060617804[69] = 0;
|
||||
out_2348542156060617804[70] = 1;
|
||||
out_2348542156060617804[71] = 0;
|
||||
out_2348542156060617804[72] = 0;
|
||||
out_2348542156060617804[73] = 0;
|
||||
out_2348542156060617804[74] = 0;
|
||||
out_2348542156060617804[75] = 0;
|
||||
out_2348542156060617804[76] = 0;
|
||||
out_2348542156060617804[77] = 0;
|
||||
out_2348542156060617804[78] = 0;
|
||||
out_2348542156060617804[79] = 0;
|
||||
out_2348542156060617804[80] = 1;
|
||||
void F_fun(double *state, double dt, double *out_6998880572782646555) {
|
||||
out_6998880572782646555[0] = 1;
|
||||
out_6998880572782646555[1] = 0;
|
||||
out_6998880572782646555[2] = 0;
|
||||
out_6998880572782646555[3] = 0;
|
||||
out_6998880572782646555[4] = 0;
|
||||
out_6998880572782646555[5] = 0;
|
||||
out_6998880572782646555[6] = 0;
|
||||
out_6998880572782646555[7] = 0;
|
||||
out_6998880572782646555[8] = 0;
|
||||
out_6998880572782646555[9] = 0;
|
||||
out_6998880572782646555[10] = 1;
|
||||
out_6998880572782646555[11] = 0;
|
||||
out_6998880572782646555[12] = 0;
|
||||
out_6998880572782646555[13] = 0;
|
||||
out_6998880572782646555[14] = 0;
|
||||
out_6998880572782646555[15] = 0;
|
||||
out_6998880572782646555[16] = 0;
|
||||
out_6998880572782646555[17] = 0;
|
||||
out_6998880572782646555[18] = 0;
|
||||
out_6998880572782646555[19] = 0;
|
||||
out_6998880572782646555[20] = 1;
|
||||
out_6998880572782646555[21] = 0;
|
||||
out_6998880572782646555[22] = 0;
|
||||
out_6998880572782646555[23] = 0;
|
||||
out_6998880572782646555[24] = 0;
|
||||
out_6998880572782646555[25] = 0;
|
||||
out_6998880572782646555[26] = 0;
|
||||
out_6998880572782646555[27] = 0;
|
||||
out_6998880572782646555[28] = 0;
|
||||
out_6998880572782646555[29] = 0;
|
||||
out_6998880572782646555[30] = 1;
|
||||
out_6998880572782646555[31] = 0;
|
||||
out_6998880572782646555[32] = 0;
|
||||
out_6998880572782646555[33] = 0;
|
||||
out_6998880572782646555[34] = 0;
|
||||
out_6998880572782646555[35] = 0;
|
||||
out_6998880572782646555[36] = 0;
|
||||
out_6998880572782646555[37] = 0;
|
||||
out_6998880572782646555[38] = 0;
|
||||
out_6998880572782646555[39] = 0;
|
||||
out_6998880572782646555[40] = 1;
|
||||
out_6998880572782646555[41] = 0;
|
||||
out_6998880572782646555[42] = 0;
|
||||
out_6998880572782646555[43] = 0;
|
||||
out_6998880572782646555[44] = 0;
|
||||
out_6998880572782646555[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4]));
|
||||
out_6998880572782646555[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2));
|
||||
out_6998880572782646555[47] = -dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_6998880572782646555[48] = -dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_6998880572782646555[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2)));
|
||||
out_6998880572782646555[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1;
|
||||
out_6998880572782646555[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]));
|
||||
out_6998880572782646555[52] = dt*stiffness_front*state[0]/(mass*state[1]);
|
||||
out_6998880572782646555[53] = -9.8100000000000005*dt;
|
||||
out_6998880572782646555[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4]));
|
||||
out_6998880572782646555[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
|
||||
out_6998880572782646555[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_6998880572782646555[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_6998880572782646555[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2)));
|
||||
out_6998880572782646555[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
|
||||
out_6998880572782646555[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1;
|
||||
out_6998880572782646555[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_6998880572782646555[62] = 0;
|
||||
out_6998880572782646555[63] = 0;
|
||||
out_6998880572782646555[64] = 0;
|
||||
out_6998880572782646555[65] = 0;
|
||||
out_6998880572782646555[66] = 0;
|
||||
out_6998880572782646555[67] = 0;
|
||||
out_6998880572782646555[68] = 0;
|
||||
out_6998880572782646555[69] = 0;
|
||||
out_6998880572782646555[70] = 1;
|
||||
out_6998880572782646555[71] = 0;
|
||||
out_6998880572782646555[72] = 0;
|
||||
out_6998880572782646555[73] = 0;
|
||||
out_6998880572782646555[74] = 0;
|
||||
out_6998880572782646555[75] = 0;
|
||||
out_6998880572782646555[76] = 0;
|
||||
out_6998880572782646555[77] = 0;
|
||||
out_6998880572782646555[78] = 0;
|
||||
out_6998880572782646555[79] = 0;
|
||||
out_6998880572782646555[80] = 1;
|
||||
}
|
||||
void h_25(double *state, double *unused, double *out_5870924613014703511) {
|
||||
out_5870924613014703511[0] = state[6];
|
||||
void h_25(double *state, double *unused, double *out_6606540369410235194) {
|
||||
out_6606540369410235194[0] = state[6];
|
||||
}
|
||||
void H_25(double *state, double *unused, double *out_7665789077203242184) {
|
||||
out_7665789077203242184[0] = 0;
|
||||
out_7665789077203242184[1] = 0;
|
||||
out_7665789077203242184[2] = 0;
|
||||
out_7665789077203242184[3] = 0;
|
||||
out_7665789077203242184[4] = 0;
|
||||
out_7665789077203242184[5] = 0;
|
||||
out_7665789077203242184[6] = 1;
|
||||
out_7665789077203242184[7] = 0;
|
||||
out_7665789077203242184[8] = 0;
|
||||
void H_25(double *state, double *unused, double *out_8666423729800410850) {
|
||||
out_8666423729800410850[0] = 0;
|
||||
out_8666423729800410850[1] = 0;
|
||||
out_8666423729800410850[2] = 0;
|
||||
out_8666423729800410850[3] = 0;
|
||||
out_8666423729800410850[4] = 0;
|
||||
out_8666423729800410850[5] = 0;
|
||||
out_8666423729800410850[6] = 1;
|
||||
out_8666423729800410850[7] = 0;
|
||||
out_8666423729800410850[8] = 0;
|
||||
}
|
||||
void h_24(double *state, double *unused, double *out_7175962086981114995) {
|
||||
out_7175962086981114995[0] = state[4];
|
||||
out_7175962086981114995[1] = state[5];
|
||||
void h_24(double *state, double *unused, double *out_4049880123285190269) {
|
||||
out_4049880123285190269[0] = state[4];
|
||||
out_4049880123285190269[1] = state[5];
|
||||
}
|
||||
void H_24(double *state, double *unused, double *out_2919279750236733150) {
|
||||
out_2919279750236733150[0] = 0;
|
||||
out_2919279750236733150[1] = 0;
|
||||
out_2919279750236733150[2] = 0;
|
||||
out_2919279750236733150[3] = 0;
|
||||
out_2919279750236733150[4] = 1;
|
||||
out_2919279750236733150[5] = 0;
|
||||
out_2919279750236733150[6] = 0;
|
||||
out_2919279750236733150[7] = 0;
|
||||
out_2919279750236733150[8] = 0;
|
||||
out_2919279750236733150[9] = 0;
|
||||
out_2919279750236733150[10] = 0;
|
||||
out_2919279750236733150[11] = 0;
|
||||
out_2919279750236733150[12] = 0;
|
||||
out_2919279750236733150[13] = 0;
|
||||
out_2919279750236733150[14] = 1;
|
||||
out_2919279750236733150[15] = 0;
|
||||
out_2919279750236733150[16] = 0;
|
||||
out_2919279750236733150[17] = 0;
|
||||
void H_24(double *state, double *unused, double *out_5108498130998087714) {
|
||||
out_5108498130998087714[0] = 0;
|
||||
out_5108498130998087714[1] = 0;
|
||||
out_5108498130998087714[2] = 0;
|
||||
out_5108498130998087714[3] = 0;
|
||||
out_5108498130998087714[4] = 1;
|
||||
out_5108498130998087714[5] = 0;
|
||||
out_5108498130998087714[6] = 0;
|
||||
out_5108498130998087714[7] = 0;
|
||||
out_5108498130998087714[8] = 0;
|
||||
out_5108498130998087714[9] = 0;
|
||||
out_5108498130998087714[10] = 0;
|
||||
out_5108498130998087714[11] = 0;
|
||||
out_5108498130998087714[12] = 0;
|
||||
out_5108498130998087714[13] = 0;
|
||||
out_5108498130998087714[14] = 1;
|
||||
out_5108498130998087714[15] = 0;
|
||||
out_5108498130998087714[16] = 0;
|
||||
out_5108498130998087714[17] = 0;
|
||||
}
|
||||
void h_30(double *state, double *unused, double *out_619120766018658974) {
|
||||
out_619120766018658974[0] = state[4];
|
||||
void h_30(double *state, double *unused, double *out_164294856940115742) {
|
||||
out_164294856940115742[0] = state[4];
|
||||
}
|
||||
void H_30(double *state, double *unused, double *out_8262622037999060805) {
|
||||
out_8262622037999060805[0] = 0;
|
||||
out_8262622037999060805[1] = 0;
|
||||
out_8262622037999060805[2] = 0;
|
||||
out_8262622037999060805[3] = 0;
|
||||
out_8262622037999060805[4] = 1;
|
||||
out_8262622037999060805[5] = 0;
|
||||
out_8262622037999060805[6] = 0;
|
||||
out_8262622037999060805[7] = 0;
|
||||
out_8262622037999060805[8] = 0;
|
||||
void H_30(double *state, double *unused, double *out_1749733388308794095) {
|
||||
out_1749733388308794095[0] = 0;
|
||||
out_1749733388308794095[1] = 0;
|
||||
out_1749733388308794095[2] = 0;
|
||||
out_1749733388308794095[3] = 0;
|
||||
out_1749733388308794095[4] = 1;
|
||||
out_1749733388308794095[5] = 0;
|
||||
out_1749733388308794095[6] = 0;
|
||||
out_1749733388308794095[7] = 0;
|
||||
out_1749733388308794095[8] = 0;
|
||||
}
|
||||
void h_26(double *state, double *unused, double *out_2561596907152652789) {
|
||||
out_2561596907152652789[0] = state[7];
|
||||
void h_26(double *state, double *unused, double *out_767610741616593259) {
|
||||
out_767610741616593259[0] = state[7];
|
||||
}
|
||||
void H_26(double *state, double *unused, double *out_3924285758329185960) {
|
||||
out_3924285758329185960[0] = 0;
|
||||
out_3924285758329185960[1] = 0;
|
||||
out_3924285758329185960[2] = 0;
|
||||
out_3924285758329185960[3] = 0;
|
||||
out_3924285758329185960[4] = 0;
|
||||
out_3924285758329185960[5] = 0;
|
||||
out_3924285758329185960[6] = 0;
|
||||
out_3924285758329185960[7] = 1;
|
||||
out_3924285758329185960[8] = 0;
|
||||
void H_26(double *state, double *unused, double *out_6038817025035084542) {
|
||||
out_6038817025035084542[0] = 0;
|
||||
out_6038817025035084542[1] = 0;
|
||||
out_6038817025035084542[2] = 0;
|
||||
out_6038817025035084542[3] = 0;
|
||||
out_6038817025035084542[4] = 0;
|
||||
out_6038817025035084542[5] = 0;
|
||||
out_6038817025035084542[6] = 0;
|
||||
out_6038817025035084542[7] = 1;
|
||||
out_6038817025035084542[8] = 0;
|
||||
}
|
||||
void h_27(double *state, double *unused, double *out_6474240497691181028) {
|
||||
out_6474240497691181028[0] = state[3];
|
||||
void h_27(double *state, double *unused, double *out_9132294156050629254) {
|
||||
out_9132294156050629254[0] = state[3];
|
||||
}
|
||||
void H_27(double *state, double *unused, double *out_6039027966815117588) {
|
||||
out_6039027966815117588[0] = 0;
|
||||
out_6039027966815117588[1] = 0;
|
||||
out_6039027966815117588[2] = 0;
|
||||
out_6039027966815117588[3] = 1;
|
||||
out_6039027966815117588[4] = 0;
|
||||
out_6039027966815117588[5] = 0;
|
||||
out_6039027966815117588[6] = 0;
|
||||
out_6039027966815117588[7] = 0;
|
||||
out_6039027966815117588[8] = 0;
|
||||
void H_27(double *state, double *unused, double *out_3924496700109219006) {
|
||||
out_3924496700109219006[0] = 0;
|
||||
out_3924496700109219006[1] = 0;
|
||||
out_3924496700109219006[2] = 0;
|
||||
out_3924496700109219006[3] = 1;
|
||||
out_3924496700109219006[4] = 0;
|
||||
out_3924496700109219006[5] = 0;
|
||||
out_3924496700109219006[6] = 0;
|
||||
out_3924496700109219006[7] = 0;
|
||||
out_3924496700109219006[8] = 0;
|
||||
}
|
||||
void h_29(double *state, double *unused, double *out_5627330291441514494) {
|
||||
out_5627330291441514494[0] = state[1];
|
||||
void h_29(double *state, double *unused, double *out_2543614691308571426) {
|
||||
out_2543614691308571426[0] = state[1];
|
||||
}
|
||||
void H_29(double *state, double *unused, double *out_7752390693684668621) {
|
||||
out_7752390693684668621[0] = 0;
|
||||
out_7752390693684668621[1] = 1;
|
||||
out_7752390693684668621[2] = 0;
|
||||
out_7752390693684668621[3] = 0;
|
||||
out_7752390693684668621[4] = 0;
|
||||
out_7752390693684668621[5] = 0;
|
||||
out_7752390693684668621[6] = 0;
|
||||
out_7752390693684668621[7] = 0;
|
||||
out_7752390693684668621[8] = 0;
|
||||
void H_29(double *state, double *unused, double *out_5637859426978770039) {
|
||||
out_5637859426978770039[0] = 0;
|
||||
out_5637859426978770039[1] = 1;
|
||||
out_5637859426978770039[2] = 0;
|
||||
out_5637859426978770039[3] = 0;
|
||||
out_5637859426978770039[4] = 0;
|
||||
out_5637859426978770039[5] = 0;
|
||||
out_5637859426978770039[6] = 0;
|
||||
out_5637859426978770039[7] = 0;
|
||||
out_5637859426978770039[8] = 0;
|
||||
}
|
||||
void h_28(double *state, double *unused, double *out_3437454446246848343) {
|
||||
out_3437454446246848343[0] = state[0];
|
||||
void h_28(double *state, double *unused, double *out_3987404092934981717) {
|
||||
out_3987404092934981717[0] = state[0];
|
||||
}
|
||||
void H_28(double *state, double *unused, double *out_5611954362955352421) {
|
||||
out_5611954362955352421[0] = 1;
|
||||
out_5611954362955352421[1] = 0;
|
||||
out_5611954362955352421[2] = 0;
|
||||
out_5611954362955352421[3] = 0;
|
||||
out_5611954362955352421[4] = 0;
|
||||
out_5611954362955352421[5] = 0;
|
||||
out_5611954362955352421[6] = 0;
|
||||
out_5611954362955352421[7] = 0;
|
||||
out_5611954362955352421[8] = 0;
|
||||
void H_28(double *state, double *unused, double *out_7726485629661251003) {
|
||||
out_7726485629661251003[0] = 1;
|
||||
out_7726485629661251003[1] = 0;
|
||||
out_7726485629661251003[2] = 0;
|
||||
out_7726485629661251003[3] = 0;
|
||||
out_7726485629661251003[4] = 0;
|
||||
out_7726485629661251003[5] = 0;
|
||||
out_7726485629661251003[6] = 0;
|
||||
out_7726485629661251003[7] = 0;
|
||||
out_7726485629661251003[8] = 0;
|
||||
}
|
||||
void h_31(double *state, double *unused, double *out_556316564325718304) {
|
||||
out_556316564325718304[0] = state[8];
|
||||
void h_31(double *state, double *unused, double *out_6594936115065281760) {
|
||||
out_6594936115065281760[0] = state[8];
|
||||
}
|
||||
void H_31(double *state, double *unused, double *out_3298077656095834484) {
|
||||
out_3298077656095834484[0] = 0;
|
||||
out_3298077656095834484[1] = 0;
|
||||
out_3298077656095834484[2] = 0;
|
||||
out_3298077656095834484[3] = 0;
|
||||
out_3298077656095834484[4] = 0;
|
||||
out_3298077656095834484[5] = 0;
|
||||
out_3298077656095834484[6] = 0;
|
||||
out_3298077656095834484[7] = 0;
|
||||
out_3298077656095834484[8] = 1;
|
||||
void H_31(double *state, double *unused, double *out_8635777767923450422) {
|
||||
out_8635777767923450422[0] = 0;
|
||||
out_8635777767923450422[1] = 0;
|
||||
out_8635777767923450422[2] = 0;
|
||||
out_8635777767923450422[3] = 0;
|
||||
out_8635777767923450422[4] = 0;
|
||||
out_8635777767923450422[5] = 0;
|
||||
out_8635777767923450422[6] = 0;
|
||||
out_8635777767923450422[7] = 0;
|
||||
out_8635777767923450422[8] = 1;
|
||||
}
|
||||
#include <eigen3/Eigen/Dense>
|
||||
#include <iostream>
|
||||
@@ -518,68 +518,68 @@ void car_update_28(double *in_x, double *in_P, double *in_z, double *in_R, doubl
|
||||
void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
|
||||
update<1, 3, 0>(in_x, in_P, h_31, H_31, NULL, in_z, in_R, in_ea, MAHA_THRESH_31);
|
||||
}
|
||||
void car_err_fun(double *nom_x, double *delta_x, double *out_7026316075073471994) {
|
||||
err_fun(nom_x, delta_x, out_7026316075073471994);
|
||||
void car_err_fun(double *nom_x, double *delta_x, double *out_2249508041139738373) {
|
||||
err_fun(nom_x, delta_x, out_2249508041139738373);
|
||||
}
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_4587773260780687079) {
|
||||
inv_err_fun(nom_x, true_x, out_4587773260780687079);
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_4788524825292355547) {
|
||||
inv_err_fun(nom_x, true_x, out_4788524825292355547);
|
||||
}
|
||||
void car_H_mod_fun(double *state, double *out_255548955770617621) {
|
||||
H_mod_fun(state, out_255548955770617621);
|
||||
void car_H_mod_fun(double *state, double *out_5143375091155045702) {
|
||||
H_mod_fun(state, out_5143375091155045702);
|
||||
}
|
||||
void car_f_fun(double *state, double dt, double *out_5905678958362697737) {
|
||||
f_fun(state, dt, out_5905678958362697737);
|
||||
void car_f_fun(double *state, double dt, double *out_223721292699517100) {
|
||||
f_fun(state, dt, out_223721292699517100);
|
||||
}
|
||||
void car_F_fun(double *state, double dt, double *out_2348542156060617804) {
|
||||
F_fun(state, dt, out_2348542156060617804);
|
||||
void car_F_fun(double *state, double dt, double *out_6998880572782646555) {
|
||||
F_fun(state, dt, out_6998880572782646555);
|
||||
}
|
||||
void car_h_25(double *state, double *unused, double *out_5870924613014703511) {
|
||||
h_25(state, unused, out_5870924613014703511);
|
||||
void car_h_25(double *state, double *unused, double *out_6606540369410235194) {
|
||||
h_25(state, unused, out_6606540369410235194);
|
||||
}
|
||||
void car_H_25(double *state, double *unused, double *out_7665789077203242184) {
|
||||
H_25(state, unused, out_7665789077203242184);
|
||||
void car_H_25(double *state, double *unused, double *out_8666423729800410850) {
|
||||
H_25(state, unused, out_8666423729800410850);
|
||||
}
|
||||
void car_h_24(double *state, double *unused, double *out_7175962086981114995) {
|
||||
h_24(state, unused, out_7175962086981114995);
|
||||
void car_h_24(double *state, double *unused, double *out_4049880123285190269) {
|
||||
h_24(state, unused, out_4049880123285190269);
|
||||
}
|
||||
void car_H_24(double *state, double *unused, double *out_2919279750236733150) {
|
||||
H_24(state, unused, out_2919279750236733150);
|
||||
void car_H_24(double *state, double *unused, double *out_5108498130998087714) {
|
||||
H_24(state, unused, out_5108498130998087714);
|
||||
}
|
||||
void car_h_30(double *state, double *unused, double *out_619120766018658974) {
|
||||
h_30(state, unused, out_619120766018658974);
|
||||
void car_h_30(double *state, double *unused, double *out_164294856940115742) {
|
||||
h_30(state, unused, out_164294856940115742);
|
||||
}
|
||||
void car_H_30(double *state, double *unused, double *out_8262622037999060805) {
|
||||
H_30(state, unused, out_8262622037999060805);
|
||||
void car_H_30(double *state, double *unused, double *out_1749733388308794095) {
|
||||
H_30(state, unused, out_1749733388308794095);
|
||||
}
|
||||
void car_h_26(double *state, double *unused, double *out_2561596907152652789) {
|
||||
h_26(state, unused, out_2561596907152652789);
|
||||
void car_h_26(double *state, double *unused, double *out_767610741616593259) {
|
||||
h_26(state, unused, out_767610741616593259);
|
||||
}
|
||||
void car_H_26(double *state, double *unused, double *out_3924285758329185960) {
|
||||
H_26(state, unused, out_3924285758329185960);
|
||||
void car_H_26(double *state, double *unused, double *out_6038817025035084542) {
|
||||
H_26(state, unused, out_6038817025035084542);
|
||||
}
|
||||
void car_h_27(double *state, double *unused, double *out_6474240497691181028) {
|
||||
h_27(state, unused, out_6474240497691181028);
|
||||
void car_h_27(double *state, double *unused, double *out_9132294156050629254) {
|
||||
h_27(state, unused, out_9132294156050629254);
|
||||
}
|
||||
void car_H_27(double *state, double *unused, double *out_6039027966815117588) {
|
||||
H_27(state, unused, out_6039027966815117588);
|
||||
void car_H_27(double *state, double *unused, double *out_3924496700109219006) {
|
||||
H_27(state, unused, out_3924496700109219006);
|
||||
}
|
||||
void car_h_29(double *state, double *unused, double *out_5627330291441514494) {
|
||||
h_29(state, unused, out_5627330291441514494);
|
||||
void car_h_29(double *state, double *unused, double *out_2543614691308571426) {
|
||||
h_29(state, unused, out_2543614691308571426);
|
||||
}
|
||||
void car_H_29(double *state, double *unused, double *out_7752390693684668621) {
|
||||
H_29(state, unused, out_7752390693684668621);
|
||||
void car_H_29(double *state, double *unused, double *out_5637859426978770039) {
|
||||
H_29(state, unused, out_5637859426978770039);
|
||||
}
|
||||
void car_h_28(double *state, double *unused, double *out_3437454446246848343) {
|
||||
h_28(state, unused, out_3437454446246848343);
|
||||
void car_h_28(double *state, double *unused, double *out_3987404092934981717) {
|
||||
h_28(state, unused, out_3987404092934981717);
|
||||
}
|
||||
void car_H_28(double *state, double *unused, double *out_5611954362955352421) {
|
||||
H_28(state, unused, out_5611954362955352421);
|
||||
void car_H_28(double *state, double *unused, double *out_7726485629661251003) {
|
||||
H_28(state, unused, out_7726485629661251003);
|
||||
}
|
||||
void car_h_31(double *state, double *unused, double *out_556316564325718304) {
|
||||
h_31(state, unused, out_556316564325718304);
|
||||
void car_h_31(double *state, double *unused, double *out_6594936115065281760) {
|
||||
h_31(state, unused, out_6594936115065281760);
|
||||
}
|
||||
void car_H_31(double *state, double *unused, double *out_3298077656095834484) {
|
||||
H_31(state, unused, out_3298077656095834484);
|
||||
void car_H_31(double *state, double *unused, double *out_8635777767923450422) {
|
||||
H_31(state, unused, out_8635777767923450422);
|
||||
}
|
||||
void car_predict(double *in_x, double *in_P, double *in_Q, double dt) {
|
||||
predict(in_x, in_P, in_Q, dt);
|
||||
|
||||
Reference in New Issue
Block a user