mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-30 05:33:45 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 531ee6a4ce |
Binary file not shown.
@@ -149,6 +149,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"Version", {PERSISTENT, STRING}},
|
||||
|
||||
// --- sunnypilot params --- //
|
||||
{"AccelBoostSP", {PERSISTENT | BACKUP, BOOL, "1"}},
|
||||
{"ApiCache_DriveStats", {PERSISTENT, JSON}},
|
||||
{"AutoLaneChangeBsmDelay", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"AutoLaneChangeTimer", {PERSISTENT | BACKUP, INT, "0"}},
|
||||
|
||||
@@ -41,326 +41,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_8240421491563361240) {
|
||||
out_8240421491563361240[0] = delta_x[0] + nom_x[0];
|
||||
out_8240421491563361240[1] = delta_x[1] + nom_x[1];
|
||||
out_8240421491563361240[2] = delta_x[2] + nom_x[2];
|
||||
out_8240421491563361240[3] = delta_x[3] + nom_x[3];
|
||||
out_8240421491563361240[4] = delta_x[4] + nom_x[4];
|
||||
out_8240421491563361240[5] = delta_x[5] + nom_x[5];
|
||||
out_8240421491563361240[6] = delta_x[6] + nom_x[6];
|
||||
out_8240421491563361240[7] = delta_x[7] + nom_x[7];
|
||||
out_8240421491563361240[8] = delta_x[8] + nom_x[8];
|
||||
void err_fun(double *nom_x, double *delta_x, double *out_6271189656317246280) {
|
||||
out_6271189656317246280[0] = delta_x[0] + nom_x[0];
|
||||
out_6271189656317246280[1] = delta_x[1] + nom_x[1];
|
||||
out_6271189656317246280[2] = delta_x[2] + nom_x[2];
|
||||
out_6271189656317246280[3] = delta_x[3] + nom_x[3];
|
||||
out_6271189656317246280[4] = delta_x[4] + nom_x[4];
|
||||
out_6271189656317246280[5] = delta_x[5] + nom_x[5];
|
||||
out_6271189656317246280[6] = delta_x[6] + nom_x[6];
|
||||
out_6271189656317246280[7] = delta_x[7] + nom_x[7];
|
||||
out_6271189656317246280[8] = delta_x[8] + nom_x[8];
|
||||
}
|
||||
void inv_err_fun(double *nom_x, double *true_x, double *out_6914926822647590994) {
|
||||
out_6914926822647590994[0] = -nom_x[0] + true_x[0];
|
||||
out_6914926822647590994[1] = -nom_x[1] + true_x[1];
|
||||
out_6914926822647590994[2] = -nom_x[2] + true_x[2];
|
||||
out_6914926822647590994[3] = -nom_x[3] + true_x[3];
|
||||
out_6914926822647590994[4] = -nom_x[4] + true_x[4];
|
||||
out_6914926822647590994[5] = -nom_x[5] + true_x[5];
|
||||
out_6914926822647590994[6] = -nom_x[6] + true_x[6];
|
||||
out_6914926822647590994[7] = -nom_x[7] + true_x[7];
|
||||
out_6914926822647590994[8] = -nom_x[8] + true_x[8];
|
||||
void inv_err_fun(double *nom_x, double *true_x, double *out_6433858960034572593) {
|
||||
out_6433858960034572593[0] = -nom_x[0] + true_x[0];
|
||||
out_6433858960034572593[1] = -nom_x[1] + true_x[1];
|
||||
out_6433858960034572593[2] = -nom_x[2] + true_x[2];
|
||||
out_6433858960034572593[3] = -nom_x[3] + true_x[3];
|
||||
out_6433858960034572593[4] = -nom_x[4] + true_x[4];
|
||||
out_6433858960034572593[5] = -nom_x[5] + true_x[5];
|
||||
out_6433858960034572593[6] = -nom_x[6] + true_x[6];
|
||||
out_6433858960034572593[7] = -nom_x[7] + true_x[7];
|
||||
out_6433858960034572593[8] = -nom_x[8] + true_x[8];
|
||||
}
|
||||
void H_mod_fun(double *state, double *out_561762666341114704) {
|
||||
out_561762666341114704[0] = 1.0;
|
||||
out_561762666341114704[1] = 0.0;
|
||||
out_561762666341114704[2] = 0.0;
|
||||
out_561762666341114704[3] = 0.0;
|
||||
out_561762666341114704[4] = 0.0;
|
||||
out_561762666341114704[5] = 0.0;
|
||||
out_561762666341114704[6] = 0.0;
|
||||
out_561762666341114704[7] = 0.0;
|
||||
out_561762666341114704[8] = 0.0;
|
||||
out_561762666341114704[9] = 0.0;
|
||||
out_561762666341114704[10] = 1.0;
|
||||
out_561762666341114704[11] = 0.0;
|
||||
out_561762666341114704[12] = 0.0;
|
||||
out_561762666341114704[13] = 0.0;
|
||||
out_561762666341114704[14] = 0.0;
|
||||
out_561762666341114704[15] = 0.0;
|
||||
out_561762666341114704[16] = 0.0;
|
||||
out_561762666341114704[17] = 0.0;
|
||||
out_561762666341114704[18] = 0.0;
|
||||
out_561762666341114704[19] = 0.0;
|
||||
out_561762666341114704[20] = 1.0;
|
||||
out_561762666341114704[21] = 0.0;
|
||||
out_561762666341114704[22] = 0.0;
|
||||
out_561762666341114704[23] = 0.0;
|
||||
out_561762666341114704[24] = 0.0;
|
||||
out_561762666341114704[25] = 0.0;
|
||||
out_561762666341114704[26] = 0.0;
|
||||
out_561762666341114704[27] = 0.0;
|
||||
out_561762666341114704[28] = 0.0;
|
||||
out_561762666341114704[29] = 0.0;
|
||||
out_561762666341114704[30] = 1.0;
|
||||
out_561762666341114704[31] = 0.0;
|
||||
out_561762666341114704[32] = 0.0;
|
||||
out_561762666341114704[33] = 0.0;
|
||||
out_561762666341114704[34] = 0.0;
|
||||
out_561762666341114704[35] = 0.0;
|
||||
out_561762666341114704[36] = 0.0;
|
||||
out_561762666341114704[37] = 0.0;
|
||||
out_561762666341114704[38] = 0.0;
|
||||
out_561762666341114704[39] = 0.0;
|
||||
out_561762666341114704[40] = 1.0;
|
||||
out_561762666341114704[41] = 0.0;
|
||||
out_561762666341114704[42] = 0.0;
|
||||
out_561762666341114704[43] = 0.0;
|
||||
out_561762666341114704[44] = 0.0;
|
||||
out_561762666341114704[45] = 0.0;
|
||||
out_561762666341114704[46] = 0.0;
|
||||
out_561762666341114704[47] = 0.0;
|
||||
out_561762666341114704[48] = 0.0;
|
||||
out_561762666341114704[49] = 0.0;
|
||||
out_561762666341114704[50] = 1.0;
|
||||
out_561762666341114704[51] = 0.0;
|
||||
out_561762666341114704[52] = 0.0;
|
||||
out_561762666341114704[53] = 0.0;
|
||||
out_561762666341114704[54] = 0.0;
|
||||
out_561762666341114704[55] = 0.0;
|
||||
out_561762666341114704[56] = 0.0;
|
||||
out_561762666341114704[57] = 0.0;
|
||||
out_561762666341114704[58] = 0.0;
|
||||
out_561762666341114704[59] = 0.0;
|
||||
out_561762666341114704[60] = 1.0;
|
||||
out_561762666341114704[61] = 0.0;
|
||||
out_561762666341114704[62] = 0.0;
|
||||
out_561762666341114704[63] = 0.0;
|
||||
out_561762666341114704[64] = 0.0;
|
||||
out_561762666341114704[65] = 0.0;
|
||||
out_561762666341114704[66] = 0.0;
|
||||
out_561762666341114704[67] = 0.0;
|
||||
out_561762666341114704[68] = 0.0;
|
||||
out_561762666341114704[69] = 0.0;
|
||||
out_561762666341114704[70] = 1.0;
|
||||
out_561762666341114704[71] = 0.0;
|
||||
out_561762666341114704[72] = 0.0;
|
||||
out_561762666341114704[73] = 0.0;
|
||||
out_561762666341114704[74] = 0.0;
|
||||
out_561762666341114704[75] = 0.0;
|
||||
out_561762666341114704[76] = 0.0;
|
||||
out_561762666341114704[77] = 0.0;
|
||||
out_561762666341114704[78] = 0.0;
|
||||
out_561762666341114704[79] = 0.0;
|
||||
out_561762666341114704[80] = 1.0;
|
||||
void H_mod_fun(double *state, double *out_7637140217932628069) {
|
||||
out_7637140217932628069[0] = 1.0;
|
||||
out_7637140217932628069[1] = 0.0;
|
||||
out_7637140217932628069[2] = 0.0;
|
||||
out_7637140217932628069[3] = 0.0;
|
||||
out_7637140217932628069[4] = 0.0;
|
||||
out_7637140217932628069[5] = 0.0;
|
||||
out_7637140217932628069[6] = 0.0;
|
||||
out_7637140217932628069[7] = 0.0;
|
||||
out_7637140217932628069[8] = 0.0;
|
||||
out_7637140217932628069[9] = 0.0;
|
||||
out_7637140217932628069[10] = 1.0;
|
||||
out_7637140217932628069[11] = 0.0;
|
||||
out_7637140217932628069[12] = 0.0;
|
||||
out_7637140217932628069[13] = 0.0;
|
||||
out_7637140217932628069[14] = 0.0;
|
||||
out_7637140217932628069[15] = 0.0;
|
||||
out_7637140217932628069[16] = 0.0;
|
||||
out_7637140217932628069[17] = 0.0;
|
||||
out_7637140217932628069[18] = 0.0;
|
||||
out_7637140217932628069[19] = 0.0;
|
||||
out_7637140217932628069[20] = 1.0;
|
||||
out_7637140217932628069[21] = 0.0;
|
||||
out_7637140217932628069[22] = 0.0;
|
||||
out_7637140217932628069[23] = 0.0;
|
||||
out_7637140217932628069[24] = 0.0;
|
||||
out_7637140217932628069[25] = 0.0;
|
||||
out_7637140217932628069[26] = 0.0;
|
||||
out_7637140217932628069[27] = 0.0;
|
||||
out_7637140217932628069[28] = 0.0;
|
||||
out_7637140217932628069[29] = 0.0;
|
||||
out_7637140217932628069[30] = 1.0;
|
||||
out_7637140217932628069[31] = 0.0;
|
||||
out_7637140217932628069[32] = 0.0;
|
||||
out_7637140217932628069[33] = 0.0;
|
||||
out_7637140217932628069[34] = 0.0;
|
||||
out_7637140217932628069[35] = 0.0;
|
||||
out_7637140217932628069[36] = 0.0;
|
||||
out_7637140217932628069[37] = 0.0;
|
||||
out_7637140217932628069[38] = 0.0;
|
||||
out_7637140217932628069[39] = 0.0;
|
||||
out_7637140217932628069[40] = 1.0;
|
||||
out_7637140217932628069[41] = 0.0;
|
||||
out_7637140217932628069[42] = 0.0;
|
||||
out_7637140217932628069[43] = 0.0;
|
||||
out_7637140217932628069[44] = 0.0;
|
||||
out_7637140217932628069[45] = 0.0;
|
||||
out_7637140217932628069[46] = 0.0;
|
||||
out_7637140217932628069[47] = 0.0;
|
||||
out_7637140217932628069[48] = 0.0;
|
||||
out_7637140217932628069[49] = 0.0;
|
||||
out_7637140217932628069[50] = 1.0;
|
||||
out_7637140217932628069[51] = 0.0;
|
||||
out_7637140217932628069[52] = 0.0;
|
||||
out_7637140217932628069[53] = 0.0;
|
||||
out_7637140217932628069[54] = 0.0;
|
||||
out_7637140217932628069[55] = 0.0;
|
||||
out_7637140217932628069[56] = 0.0;
|
||||
out_7637140217932628069[57] = 0.0;
|
||||
out_7637140217932628069[58] = 0.0;
|
||||
out_7637140217932628069[59] = 0.0;
|
||||
out_7637140217932628069[60] = 1.0;
|
||||
out_7637140217932628069[61] = 0.0;
|
||||
out_7637140217932628069[62] = 0.0;
|
||||
out_7637140217932628069[63] = 0.0;
|
||||
out_7637140217932628069[64] = 0.0;
|
||||
out_7637140217932628069[65] = 0.0;
|
||||
out_7637140217932628069[66] = 0.0;
|
||||
out_7637140217932628069[67] = 0.0;
|
||||
out_7637140217932628069[68] = 0.0;
|
||||
out_7637140217932628069[69] = 0.0;
|
||||
out_7637140217932628069[70] = 1.0;
|
||||
out_7637140217932628069[71] = 0.0;
|
||||
out_7637140217932628069[72] = 0.0;
|
||||
out_7637140217932628069[73] = 0.0;
|
||||
out_7637140217932628069[74] = 0.0;
|
||||
out_7637140217932628069[75] = 0.0;
|
||||
out_7637140217932628069[76] = 0.0;
|
||||
out_7637140217932628069[77] = 0.0;
|
||||
out_7637140217932628069[78] = 0.0;
|
||||
out_7637140217932628069[79] = 0.0;
|
||||
out_7637140217932628069[80] = 1.0;
|
||||
}
|
||||
void f_fun(double *state, double dt, double *out_501741451878738685) {
|
||||
out_501741451878738685[0] = state[0];
|
||||
out_501741451878738685[1] = state[1];
|
||||
out_501741451878738685[2] = state[2];
|
||||
out_501741451878738685[3] = state[3];
|
||||
out_501741451878738685[4] = state[4];
|
||||
out_501741451878738685[5] = dt*(stiffness_front*(-state[2] - state[3] + state[7])*state[0]/state[1] + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/state[4] + ((-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/state[4] - state[4])*state[6] - 9.8100000000000005*state[8]) + state[5];
|
||||
out_501741451878738685[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_501741451878738685[7] = state[7];
|
||||
out_501741451878738685[8] = state[8];
|
||||
void f_fun(double *state, double dt, double *out_1906988367213554534) {
|
||||
out_1906988367213554534[0] = state[0];
|
||||
out_1906988367213554534[1] = state[1];
|
||||
out_1906988367213554534[2] = state[2];
|
||||
out_1906988367213554534[3] = state[3];
|
||||
out_1906988367213554534[4] = state[4];
|
||||
out_1906988367213554534[5] = dt*(stiffness_front*(-state[2] - state[3] + state[7])*state[0]/state[1] + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/state[4] + ((-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/state[4] - state[4])*state[6] - 9.8100000000000005*state[8]) + state[5];
|
||||
out_1906988367213554534[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_1906988367213554534[7] = state[7];
|
||||
out_1906988367213554534[8] = state[8];
|
||||
}
|
||||
void F_fun(double *state, double dt, double *out_9118730550037776269) {
|
||||
out_9118730550037776269[0] = 1;
|
||||
out_9118730550037776269[1] = 0;
|
||||
out_9118730550037776269[2] = 0;
|
||||
out_9118730550037776269[3] = 0;
|
||||
out_9118730550037776269[4] = 0;
|
||||
out_9118730550037776269[5] = 0;
|
||||
out_9118730550037776269[6] = 0;
|
||||
out_9118730550037776269[7] = 0;
|
||||
out_9118730550037776269[8] = 0;
|
||||
out_9118730550037776269[9] = 0;
|
||||
out_9118730550037776269[10] = 1;
|
||||
out_9118730550037776269[11] = 0;
|
||||
out_9118730550037776269[12] = 0;
|
||||
out_9118730550037776269[13] = 0;
|
||||
out_9118730550037776269[14] = 0;
|
||||
out_9118730550037776269[15] = 0;
|
||||
out_9118730550037776269[16] = 0;
|
||||
out_9118730550037776269[17] = 0;
|
||||
out_9118730550037776269[18] = 0;
|
||||
out_9118730550037776269[19] = 0;
|
||||
out_9118730550037776269[20] = 1;
|
||||
out_9118730550037776269[21] = 0;
|
||||
out_9118730550037776269[22] = 0;
|
||||
out_9118730550037776269[23] = 0;
|
||||
out_9118730550037776269[24] = 0;
|
||||
out_9118730550037776269[25] = 0;
|
||||
out_9118730550037776269[26] = 0;
|
||||
out_9118730550037776269[27] = 0;
|
||||
out_9118730550037776269[28] = 0;
|
||||
out_9118730550037776269[29] = 0;
|
||||
out_9118730550037776269[30] = 1;
|
||||
out_9118730550037776269[31] = 0;
|
||||
out_9118730550037776269[32] = 0;
|
||||
out_9118730550037776269[33] = 0;
|
||||
out_9118730550037776269[34] = 0;
|
||||
out_9118730550037776269[35] = 0;
|
||||
out_9118730550037776269[36] = 0;
|
||||
out_9118730550037776269[37] = 0;
|
||||
out_9118730550037776269[38] = 0;
|
||||
out_9118730550037776269[39] = 0;
|
||||
out_9118730550037776269[40] = 1;
|
||||
out_9118730550037776269[41] = 0;
|
||||
out_9118730550037776269[42] = 0;
|
||||
out_9118730550037776269[43] = 0;
|
||||
out_9118730550037776269[44] = 0;
|
||||
out_9118730550037776269[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/state[1] + (-stiffness_front - stiffness_rear)*state[5]/state[4] + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/state[4]);
|
||||
out_9118730550037776269[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/pow(state[1], 2);
|
||||
out_9118730550037776269[47] = -dt*stiffness_front*state[0]/state[1];
|
||||
out_9118730550037776269[48] = -dt*stiffness_front*state[0]/state[1];
|
||||
out_9118730550037776269[49] = dt*(-(-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/pow(state[4], 2) + (-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/pow(state[4], 2) - 1)*state[6]);
|
||||
out_9118730550037776269[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/state[4] + 1;
|
||||
out_9118730550037776269[51] = dt*((-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/state[4] - state[4]);
|
||||
out_9118730550037776269[52] = dt*stiffness_front*state[0]/state[1];
|
||||
out_9118730550037776269[53] = -9.8100000000000005*dt;
|
||||
out_9118730550037776269[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_9118730550037776269[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
|
||||
out_9118730550037776269[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_9118730550037776269[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_9118730550037776269[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_9118730550037776269[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
|
||||
out_9118730550037776269[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_9118730550037776269[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_9118730550037776269[62] = 0;
|
||||
out_9118730550037776269[63] = 0;
|
||||
out_9118730550037776269[64] = 0;
|
||||
out_9118730550037776269[65] = 0;
|
||||
out_9118730550037776269[66] = 0;
|
||||
out_9118730550037776269[67] = 0;
|
||||
out_9118730550037776269[68] = 0;
|
||||
out_9118730550037776269[69] = 0;
|
||||
out_9118730550037776269[70] = 1;
|
||||
out_9118730550037776269[71] = 0;
|
||||
out_9118730550037776269[72] = 0;
|
||||
out_9118730550037776269[73] = 0;
|
||||
out_9118730550037776269[74] = 0;
|
||||
out_9118730550037776269[75] = 0;
|
||||
out_9118730550037776269[76] = 0;
|
||||
out_9118730550037776269[77] = 0;
|
||||
out_9118730550037776269[78] = 0;
|
||||
out_9118730550037776269[79] = 0;
|
||||
out_9118730550037776269[80] = 1;
|
||||
void F_fun(double *state, double dt, double *out_7017497222690064892) {
|
||||
out_7017497222690064892[0] = 1;
|
||||
out_7017497222690064892[1] = 0;
|
||||
out_7017497222690064892[2] = 0;
|
||||
out_7017497222690064892[3] = 0;
|
||||
out_7017497222690064892[4] = 0;
|
||||
out_7017497222690064892[5] = 0;
|
||||
out_7017497222690064892[6] = 0;
|
||||
out_7017497222690064892[7] = 0;
|
||||
out_7017497222690064892[8] = 0;
|
||||
out_7017497222690064892[9] = 0;
|
||||
out_7017497222690064892[10] = 1;
|
||||
out_7017497222690064892[11] = 0;
|
||||
out_7017497222690064892[12] = 0;
|
||||
out_7017497222690064892[13] = 0;
|
||||
out_7017497222690064892[14] = 0;
|
||||
out_7017497222690064892[15] = 0;
|
||||
out_7017497222690064892[16] = 0;
|
||||
out_7017497222690064892[17] = 0;
|
||||
out_7017497222690064892[18] = 0;
|
||||
out_7017497222690064892[19] = 0;
|
||||
out_7017497222690064892[20] = 1;
|
||||
out_7017497222690064892[21] = 0;
|
||||
out_7017497222690064892[22] = 0;
|
||||
out_7017497222690064892[23] = 0;
|
||||
out_7017497222690064892[24] = 0;
|
||||
out_7017497222690064892[25] = 0;
|
||||
out_7017497222690064892[26] = 0;
|
||||
out_7017497222690064892[27] = 0;
|
||||
out_7017497222690064892[28] = 0;
|
||||
out_7017497222690064892[29] = 0;
|
||||
out_7017497222690064892[30] = 1;
|
||||
out_7017497222690064892[31] = 0;
|
||||
out_7017497222690064892[32] = 0;
|
||||
out_7017497222690064892[33] = 0;
|
||||
out_7017497222690064892[34] = 0;
|
||||
out_7017497222690064892[35] = 0;
|
||||
out_7017497222690064892[36] = 0;
|
||||
out_7017497222690064892[37] = 0;
|
||||
out_7017497222690064892[38] = 0;
|
||||
out_7017497222690064892[39] = 0;
|
||||
out_7017497222690064892[40] = 1;
|
||||
out_7017497222690064892[41] = 0;
|
||||
out_7017497222690064892[42] = 0;
|
||||
out_7017497222690064892[43] = 0;
|
||||
out_7017497222690064892[44] = 0;
|
||||
out_7017497222690064892[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/state[1] + (-stiffness_front - stiffness_rear)*state[5]/state[4] + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/state[4]);
|
||||
out_7017497222690064892[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/pow(state[1], 2);
|
||||
out_7017497222690064892[47] = -dt*stiffness_front*state[0]/state[1];
|
||||
out_7017497222690064892[48] = -dt*stiffness_front*state[0]/state[1];
|
||||
out_7017497222690064892[49] = dt*(-(-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/pow(state[4], 2) + (-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/pow(state[4], 2) - 1)*state[6]);
|
||||
out_7017497222690064892[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/state[4] + 1;
|
||||
out_7017497222690064892[51] = dt*((-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/state[4] - state[4]);
|
||||
out_7017497222690064892[52] = dt*stiffness_front*state[0]/state[1];
|
||||
out_7017497222690064892[53] = -9.8100000000000005*dt;
|
||||
out_7017497222690064892[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_7017497222690064892[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
|
||||
out_7017497222690064892[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_7017497222690064892[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_7017497222690064892[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_7017497222690064892[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
|
||||
out_7017497222690064892[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_7017497222690064892[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
|
||||
out_7017497222690064892[62] = 0;
|
||||
out_7017497222690064892[63] = 0;
|
||||
out_7017497222690064892[64] = 0;
|
||||
out_7017497222690064892[65] = 0;
|
||||
out_7017497222690064892[66] = 0;
|
||||
out_7017497222690064892[67] = 0;
|
||||
out_7017497222690064892[68] = 0;
|
||||
out_7017497222690064892[69] = 0;
|
||||
out_7017497222690064892[70] = 1;
|
||||
out_7017497222690064892[71] = 0;
|
||||
out_7017497222690064892[72] = 0;
|
||||
out_7017497222690064892[73] = 0;
|
||||
out_7017497222690064892[74] = 0;
|
||||
out_7017497222690064892[75] = 0;
|
||||
out_7017497222690064892[76] = 0;
|
||||
out_7017497222690064892[77] = 0;
|
||||
out_7017497222690064892[78] = 0;
|
||||
out_7017497222690064892[79] = 0;
|
||||
out_7017497222690064892[80] = 1;
|
||||
}
|
||||
void h_25(double *state, double *unused, double *out_7122489490265823164) {
|
||||
out_7122489490265823164[0] = state[6];
|
||||
void h_25(double *state, double *unused, double *out_8835429561654640393) {
|
||||
out_8835429561654640393[0] = state[6];
|
||||
}
|
||||
void H_25(double *state, double *unused, double *out_6821752007178854201) {
|
||||
out_6821752007178854201[0] = 0;
|
||||
out_6821752007178854201[1] = 0;
|
||||
out_6821752007178854201[2] = 0;
|
||||
out_6821752007178854201[3] = 0;
|
||||
out_6821752007178854201[4] = 0;
|
||||
out_6821752007178854201[5] = 0;
|
||||
out_6821752007178854201[6] = 1;
|
||||
out_6821752007178854201[7] = 0;
|
||||
out_6821752007178854201[8] = 0;
|
||||
void H_25(double *state, double *unused, double *out_4114159567943136392) {
|
||||
out_4114159567943136392[0] = 0;
|
||||
out_4114159567943136392[1] = 0;
|
||||
out_4114159567943136392[2] = 0;
|
||||
out_4114159567943136392[3] = 0;
|
||||
out_4114159567943136392[4] = 0;
|
||||
out_4114159567943136392[5] = 0;
|
||||
out_4114159567943136392[6] = 1;
|
||||
out_4114159567943136392[7] = 0;
|
||||
out_4114159567943136392[8] = 0;
|
||||
}
|
||||
void h_24(double *state, double *unused, double *out_8226117433674441840) {
|
||||
out_8226117433674441840[0] = state[4];
|
||||
out_8226117433674441840[1] = state[5];
|
||||
void h_24(double *state, double *unused, double *out_9138703725448962253) {
|
||||
out_9138703725448962253[0] = state[4];
|
||||
out_9138703725448962253[1] = state[5];
|
||||
}
|
||||
void H_24(double *state, double *unused, double *out_7642668915132929517) {
|
||||
out_7642668915132929517[0] = 0;
|
||||
out_7642668915132929517[1] = 0;
|
||||
out_7642668915132929517[2] = 0;
|
||||
out_7642668915132929517[3] = 0;
|
||||
out_7642668915132929517[4] = 1;
|
||||
out_7642668915132929517[5] = 0;
|
||||
out_7642668915132929517[6] = 0;
|
||||
out_7642668915132929517[7] = 0;
|
||||
out_7642668915132929517[8] = 0;
|
||||
out_7642668915132929517[9] = 0;
|
||||
out_7642668915132929517[10] = 0;
|
||||
out_7642668915132929517[11] = 0;
|
||||
out_7642668915132929517[12] = 0;
|
||||
out_7642668915132929517[13] = 0;
|
||||
out_7642668915132929517[14] = 1;
|
||||
out_7642668915132929517[15] = 0;
|
||||
out_7642668915132929517[16] = 0;
|
||||
out_7642668915132929517[17] = 0;
|
||||
void H_24(double *state, double *unused, double *out_8860668894909645426) {
|
||||
out_8860668894909645426[0] = 0;
|
||||
out_8860668894909645426[1] = 0;
|
||||
out_8860668894909645426[2] = 0;
|
||||
out_8860668894909645426[3] = 0;
|
||||
out_8860668894909645426[4] = 1;
|
||||
out_8860668894909645426[5] = 0;
|
||||
out_8860668894909645426[6] = 0;
|
||||
out_8860668894909645426[7] = 0;
|
||||
out_8860668894909645426[8] = 0;
|
||||
out_8860668894909645426[9] = 0;
|
||||
out_8860668894909645426[10] = 0;
|
||||
out_8860668894909645426[11] = 0;
|
||||
out_8860668894909645426[12] = 0;
|
||||
out_8860668894909645426[13] = 0;
|
||||
out_8860668894909645426[14] = 1;
|
||||
out_8860668894909645426[15] = 0;
|
||||
out_8860668894909645426[16] = 0;
|
||||
out_8860668894909645426[17] = 0;
|
||||
}
|
||||
void h_30(double *state, double *unused, double *out_4960660605141912591) {
|
||||
out_4960660605141912591[0] = state[4];
|
||||
void h_30(double *state, double *unused, double *out_9110623623939146282) {
|
||||
out_9110623623939146282[0] = state[4];
|
||||
}
|
||||
void H_30(double *state, double *unused, double *out_94938334312762554) {
|
||||
out_94938334312762554[0] = 0;
|
||||
out_94938334312762554[1] = 0;
|
||||
out_94938334312762554[2] = 0;
|
||||
out_94938334312762554[3] = 0;
|
||||
out_94938334312762554[4] = 1;
|
||||
out_94938334312762554[5] = 0;
|
||||
out_94938334312762554[6] = 0;
|
||||
out_94938334312762554[7] = 0;
|
||||
out_94938334312762554[8] = 0;
|
||||
void H_30(double *state, double *unused, double *out_2802530773548480363) {
|
||||
out_2802530773548480363[0] = 0;
|
||||
out_2802530773548480363[1] = 0;
|
||||
out_2802530773548480363[2] = 0;
|
||||
out_2802530773548480363[3] = 0;
|
||||
out_2802530773548480363[4] = 1;
|
||||
out_2802530773548480363[5] = 0;
|
||||
out_2802530773548480363[6] = 0;
|
||||
out_2802530773548480363[7] = 0;
|
||||
out_2802530773548480363[8] = 0;
|
||||
}
|
||||
void h_26(double *state, double *unused, double *out_2356255284333214940) {
|
||||
out_2356255284333214940[0] = state[7];
|
||||
void h_26(double *state, double *unused, double *out_2937078932356556188) {
|
||||
out_2937078932356556188[0] = state[7];
|
||||
}
|
||||
void H_26(double *state, double *unused, double *out_3517226037418053600) {
|
||||
out_3517226037418053600[0] = 0;
|
||||
out_3517226037418053600[1] = 0;
|
||||
out_3517226037418053600[2] = 0;
|
||||
out_3517226037418053600[3] = 0;
|
||||
out_3517226037418053600[4] = 0;
|
||||
out_3517226037418053600[5] = 0;
|
||||
out_3517226037418053600[6] = 0;
|
||||
out_3517226037418053600[7] = 1;
|
||||
out_3517226037418053600[8] = 0;
|
||||
void H_26(double *state, double *unused, double *out_7855662886817192616) {
|
||||
out_7855662886817192616[0] = 0;
|
||||
out_7855662886817192616[1] = 0;
|
||||
out_7855662886817192616[2] = 0;
|
||||
out_7855662886817192616[3] = 0;
|
||||
out_7855662886817192616[4] = 0;
|
||||
out_7855662886817192616[5] = 0;
|
||||
out_7855662886817192616[6] = 0;
|
||||
out_7855662886817192616[7] = 1;
|
||||
out_7855662886817192616[8] = 0;
|
||||
}
|
||||
void h_27(double *state, double *unused, double *out_1556388306205313299) {
|
||||
out_1556388306205313299[0] = state[3];
|
||||
void h_27(double *state, double *unused, double *out_4609641244394065578) {
|
||||
out_4609641244394065578[0] = state[3];
|
||||
}
|
||||
void H_27(double *state, double *unused, double *out_2079824977487662357) {
|
||||
out_2079824977487662357[0] = 0;
|
||||
out_2079824977487662357[1] = 0;
|
||||
out_2079824977487662357[2] = 0;
|
||||
out_2079824977487662357[3] = 1;
|
||||
out_2079824977487662357[4] = 0;
|
||||
out_2079824977487662357[5] = 0;
|
||||
out_2079824977487662357[6] = 0;
|
||||
out_2079824977487662357[7] = 0;
|
||||
out_2079824977487662357[8] = 0;
|
||||
void H_27(double *state, double *unused, double *out_627767461748055452) {
|
||||
out_627767461748055452[0] = 0;
|
||||
out_627767461748055452[1] = 0;
|
||||
out_627767461748055452[2] = 0;
|
||||
out_627767461748055452[3] = 1;
|
||||
out_627767461748055452[4] = 0;
|
||||
out_627767461748055452[5] = 0;
|
||||
out_627767461748055452[6] = 0;
|
||||
out_627767461748055452[7] = 0;
|
||||
out_627767461748055452[8] = 0;
|
||||
}
|
||||
void h_29(double *state, double *unused, double *out_4504114296560798260) {
|
||||
out_4504114296560798260[0] = state[1];
|
||||
void h_29(double *state, double *unused, double *out_6073837572494813597) {
|
||||
out_6073837572494813597[0] = state[1];
|
||||
}
|
||||
void H_29(double *state, double *unused, double *out_605169678627154738) {
|
||||
out_605169678627154738[0] = 0;
|
||||
out_605169678627154738[1] = 1;
|
||||
out_605169678627154738[2] = 0;
|
||||
out_605169678627154738[3] = 0;
|
||||
out_605169678627154738[4] = 0;
|
||||
out_605169678627154738[5] = 0;
|
||||
out_605169678627154738[6] = 0;
|
||||
out_605169678627154738[7] = 0;
|
||||
out_605169678627154738[8] = 0;
|
||||
void H_29(double *state, double *unused, double *out_3312762117862872547) {
|
||||
out_3312762117862872547[0] = 0;
|
||||
out_3312762117862872547[1] = 1;
|
||||
out_3312762117862872547[2] = 0;
|
||||
out_3312762117862872547[3] = 0;
|
||||
out_3312762117862872547[4] = 0;
|
||||
out_3312762117862872547[5] = 0;
|
||||
out_3312762117862872547[6] = 0;
|
||||
out_3312762117862872547[7] = 0;
|
||||
out_3312762117862872547[8] = 0;
|
||||
}
|
||||
void h_28(double *state, double *unused, double *out_4842653211208535847) {
|
||||
out_4842653211208535847[0] = state[0];
|
||||
void h_28(double *state, double *unused, double *out_8495235593429455475) {
|
||||
out_8495235593429455475[0] = state[0];
|
||||
}
|
||||
void H_28(double *state, double *unused, double *out_4477229338442375836) {
|
||||
out_4477229338442375836[0] = 1;
|
||||
out_4477229338442375836[1] = 0;
|
||||
out_4477229338442375836[2] = 0;
|
||||
out_4477229338442375836[3] = 0;
|
||||
out_4477229338442375836[4] = 0;
|
||||
out_4477229338442375836[5] = 0;
|
||||
out_4477229338442375836[6] = 0;
|
||||
out_4477229338442375836[7] = 0;
|
||||
out_4477229338442375836[8] = 0;
|
||||
void H_28(double *state, double *unused, double *out_1769636899206658027) {
|
||||
out_1769636899206658027[0] = 1;
|
||||
out_1769636899206658027[1] = 0;
|
||||
out_1769636899206658027[2] = 0;
|
||||
out_1769636899206658027[3] = 0;
|
||||
out_1769636899206658027[4] = 0;
|
||||
out_1769636899206658027[5] = 0;
|
||||
out_1769636899206658027[6] = 0;
|
||||
out_1769636899206658027[7] = 0;
|
||||
out_1769636899206658027[8] = 0;
|
||||
}
|
||||
void h_31(double *state, double *unused, double *out_2684377106725186568) {
|
||||
out_2684377106725186568[0] = state[8];
|
||||
void h_31(double *state, double *unused, double *out_5197980033400618043) {
|
||||
out_5197980033400618043[0] = state[8];
|
||||
}
|
||||
void H_31(double *state, double *unused, double *out_254923243332963052) {
|
||||
out_254923243332963052[0] = 0;
|
||||
out_254923243332963052[1] = 0;
|
||||
out_254923243332963052[2] = 0;
|
||||
out_254923243332963052[3] = 0;
|
||||
out_254923243332963052[4] = 0;
|
||||
out_254923243332963052[5] = 0;
|
||||
out_254923243332963052[6] = 0;
|
||||
out_254923243332963052[7] = 0;
|
||||
out_254923243332963052[8] = 1;
|
||||
void H_31(double *state, double *unused, double *out_4083513606066175964) {
|
||||
out_4083513606066175964[0] = 0;
|
||||
out_4083513606066175964[1] = 0;
|
||||
out_4083513606066175964[2] = 0;
|
||||
out_4083513606066175964[3] = 0;
|
||||
out_4083513606066175964[4] = 0;
|
||||
out_4083513606066175964[5] = 0;
|
||||
out_4083513606066175964[6] = 0;
|
||||
out_4083513606066175964[7] = 0;
|
||||
out_4083513606066175964[8] = 1;
|
||||
}
|
||||
#include <eigen3/Eigen/Dense>
|
||||
#include <iostream>
|
||||
@@ -514,68 +514,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_8240421491563361240) {
|
||||
err_fun(nom_x, delta_x, out_8240421491563361240);
|
||||
void car_err_fun(double *nom_x, double *delta_x, double *out_6271189656317246280) {
|
||||
err_fun(nom_x, delta_x, out_6271189656317246280);
|
||||
}
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_6914926822647590994) {
|
||||
inv_err_fun(nom_x, true_x, out_6914926822647590994);
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_6433858960034572593) {
|
||||
inv_err_fun(nom_x, true_x, out_6433858960034572593);
|
||||
}
|
||||
void car_H_mod_fun(double *state, double *out_561762666341114704) {
|
||||
H_mod_fun(state, out_561762666341114704);
|
||||
void car_H_mod_fun(double *state, double *out_7637140217932628069) {
|
||||
H_mod_fun(state, out_7637140217932628069);
|
||||
}
|
||||
void car_f_fun(double *state, double dt, double *out_501741451878738685) {
|
||||
f_fun(state, dt, out_501741451878738685);
|
||||
void car_f_fun(double *state, double dt, double *out_1906988367213554534) {
|
||||
f_fun(state, dt, out_1906988367213554534);
|
||||
}
|
||||
void car_F_fun(double *state, double dt, double *out_9118730550037776269) {
|
||||
F_fun(state, dt, out_9118730550037776269);
|
||||
void car_F_fun(double *state, double dt, double *out_7017497222690064892) {
|
||||
F_fun(state, dt, out_7017497222690064892);
|
||||
}
|
||||
void car_h_25(double *state, double *unused, double *out_7122489490265823164) {
|
||||
h_25(state, unused, out_7122489490265823164);
|
||||
void car_h_25(double *state, double *unused, double *out_8835429561654640393) {
|
||||
h_25(state, unused, out_8835429561654640393);
|
||||
}
|
||||
void car_H_25(double *state, double *unused, double *out_6821752007178854201) {
|
||||
H_25(state, unused, out_6821752007178854201);
|
||||
void car_H_25(double *state, double *unused, double *out_4114159567943136392) {
|
||||
H_25(state, unused, out_4114159567943136392);
|
||||
}
|
||||
void car_h_24(double *state, double *unused, double *out_8226117433674441840) {
|
||||
h_24(state, unused, out_8226117433674441840);
|
||||
void car_h_24(double *state, double *unused, double *out_9138703725448962253) {
|
||||
h_24(state, unused, out_9138703725448962253);
|
||||
}
|
||||
void car_H_24(double *state, double *unused, double *out_7642668915132929517) {
|
||||
H_24(state, unused, out_7642668915132929517);
|
||||
void car_H_24(double *state, double *unused, double *out_8860668894909645426) {
|
||||
H_24(state, unused, out_8860668894909645426);
|
||||
}
|
||||
void car_h_30(double *state, double *unused, double *out_4960660605141912591) {
|
||||
h_30(state, unused, out_4960660605141912591);
|
||||
void car_h_30(double *state, double *unused, double *out_9110623623939146282) {
|
||||
h_30(state, unused, out_9110623623939146282);
|
||||
}
|
||||
void car_H_30(double *state, double *unused, double *out_94938334312762554) {
|
||||
H_30(state, unused, out_94938334312762554);
|
||||
void car_H_30(double *state, double *unused, double *out_2802530773548480363) {
|
||||
H_30(state, unused, out_2802530773548480363);
|
||||
}
|
||||
void car_h_26(double *state, double *unused, double *out_2356255284333214940) {
|
||||
h_26(state, unused, out_2356255284333214940);
|
||||
void car_h_26(double *state, double *unused, double *out_2937078932356556188) {
|
||||
h_26(state, unused, out_2937078932356556188);
|
||||
}
|
||||
void car_H_26(double *state, double *unused, double *out_3517226037418053600) {
|
||||
H_26(state, unused, out_3517226037418053600);
|
||||
void car_H_26(double *state, double *unused, double *out_7855662886817192616) {
|
||||
H_26(state, unused, out_7855662886817192616);
|
||||
}
|
||||
void car_h_27(double *state, double *unused, double *out_1556388306205313299) {
|
||||
h_27(state, unused, out_1556388306205313299);
|
||||
void car_h_27(double *state, double *unused, double *out_4609641244394065578) {
|
||||
h_27(state, unused, out_4609641244394065578);
|
||||
}
|
||||
void car_H_27(double *state, double *unused, double *out_2079824977487662357) {
|
||||
H_27(state, unused, out_2079824977487662357);
|
||||
void car_H_27(double *state, double *unused, double *out_627767461748055452) {
|
||||
H_27(state, unused, out_627767461748055452);
|
||||
}
|
||||
void car_h_29(double *state, double *unused, double *out_4504114296560798260) {
|
||||
h_29(state, unused, out_4504114296560798260);
|
||||
void car_h_29(double *state, double *unused, double *out_6073837572494813597) {
|
||||
h_29(state, unused, out_6073837572494813597);
|
||||
}
|
||||
void car_H_29(double *state, double *unused, double *out_605169678627154738) {
|
||||
H_29(state, unused, out_605169678627154738);
|
||||
void car_H_29(double *state, double *unused, double *out_3312762117862872547) {
|
||||
H_29(state, unused, out_3312762117862872547);
|
||||
}
|
||||
void car_h_28(double *state, double *unused, double *out_4842653211208535847) {
|
||||
h_28(state, unused, out_4842653211208535847);
|
||||
void car_h_28(double *state, double *unused, double *out_8495235593429455475) {
|
||||
h_28(state, unused, out_8495235593429455475);
|
||||
}
|
||||
void car_H_28(double *state, double *unused, double *out_4477229338442375836) {
|
||||
H_28(state, unused, out_4477229338442375836);
|
||||
void car_H_28(double *state, double *unused, double *out_1769636899206658027) {
|
||||
H_28(state, unused, out_1769636899206658027);
|
||||
}
|
||||
void car_h_31(double *state, double *unused, double *out_2684377106725186568) {
|
||||
h_31(state, unused, out_2684377106725186568);
|
||||
void car_h_31(double *state, double *unused, double *out_5197980033400618043) {
|
||||
h_31(state, unused, out_5197980033400618043);
|
||||
}
|
||||
void car_H_31(double *state, double *unused, double *out_254923243332963052) {
|
||||
H_31(state, unused, out_254923243332963052);
|
||||
void car_H_31(double *state, double *unused, double *out_4083513606066175964) {
|
||||
H_31(state, unused, out_4083513606066175964);
|
||||
}
|
||||
void car_predict(double *in_x, double *in_P, double *in_Q, double dt) {
|
||||
predict(in_x, in_P, in_Q, dt);
|
||||
|
||||
@@ -9,27 +9,27 @@ void car_update_27(double *in_x, double *in_P, double *in_z, double *in_R, doubl
|
||||
void car_update_29(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void car_update_28(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void car_err_fun(double *nom_x, double *delta_x, double *out_8240421491563361240);
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_6914926822647590994);
|
||||
void car_H_mod_fun(double *state, double *out_561762666341114704);
|
||||
void car_f_fun(double *state, double dt, double *out_501741451878738685);
|
||||
void car_F_fun(double *state, double dt, double *out_9118730550037776269);
|
||||
void car_h_25(double *state, double *unused, double *out_7122489490265823164);
|
||||
void car_H_25(double *state, double *unused, double *out_6821752007178854201);
|
||||
void car_h_24(double *state, double *unused, double *out_8226117433674441840);
|
||||
void car_H_24(double *state, double *unused, double *out_7642668915132929517);
|
||||
void car_h_30(double *state, double *unused, double *out_4960660605141912591);
|
||||
void car_H_30(double *state, double *unused, double *out_94938334312762554);
|
||||
void car_h_26(double *state, double *unused, double *out_2356255284333214940);
|
||||
void car_H_26(double *state, double *unused, double *out_3517226037418053600);
|
||||
void car_h_27(double *state, double *unused, double *out_1556388306205313299);
|
||||
void car_H_27(double *state, double *unused, double *out_2079824977487662357);
|
||||
void car_h_29(double *state, double *unused, double *out_4504114296560798260);
|
||||
void car_H_29(double *state, double *unused, double *out_605169678627154738);
|
||||
void car_h_28(double *state, double *unused, double *out_4842653211208535847);
|
||||
void car_H_28(double *state, double *unused, double *out_4477229338442375836);
|
||||
void car_h_31(double *state, double *unused, double *out_2684377106725186568);
|
||||
void car_H_31(double *state, double *unused, double *out_254923243332963052);
|
||||
void car_err_fun(double *nom_x, double *delta_x, double *out_6271189656317246280);
|
||||
void car_inv_err_fun(double *nom_x, double *true_x, double *out_6433858960034572593);
|
||||
void car_H_mod_fun(double *state, double *out_7637140217932628069);
|
||||
void car_f_fun(double *state, double dt, double *out_1906988367213554534);
|
||||
void car_F_fun(double *state, double dt, double *out_7017497222690064892);
|
||||
void car_h_25(double *state, double *unused, double *out_8835429561654640393);
|
||||
void car_H_25(double *state, double *unused, double *out_4114159567943136392);
|
||||
void car_h_24(double *state, double *unused, double *out_9138703725448962253);
|
||||
void car_H_24(double *state, double *unused, double *out_8860668894909645426);
|
||||
void car_h_30(double *state, double *unused, double *out_9110623623939146282);
|
||||
void car_H_30(double *state, double *unused, double *out_2802530773548480363);
|
||||
void car_h_26(double *state, double *unused, double *out_2937078932356556188);
|
||||
void car_H_26(double *state, double *unused, double *out_7855662886817192616);
|
||||
void car_h_27(double *state, double *unused, double *out_4609641244394065578);
|
||||
void car_H_27(double *state, double *unused, double *out_627767461748055452);
|
||||
void car_h_29(double *state, double *unused, double *out_6073837572494813597);
|
||||
void car_H_29(double *state, double *unused, double *out_3312762117862872547);
|
||||
void car_h_28(double *state, double *unused, double *out_8495235593429455475);
|
||||
void car_H_28(double *state, double *unused, double *out_1769636899206658027);
|
||||
void car_h_31(double *state, double *unused, double *out_5197980033400618043);
|
||||
void car_H_31(double *state, double *unused, double *out_4083513606066175964);
|
||||
void car_predict(double *in_x, double *in_P, double *in_Q, double dt);
|
||||
void car_set_rotational_inertia(double x);
|
||||
void car_set_center_to_front(double x);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -5,18 +5,18 @@ void pose_update_4(double *in_x, double *in_P, double *in_z, double *in_R, doubl
|
||||
void pose_update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void pose_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void pose_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
|
||||
void pose_err_fun(double *nom_x, double *delta_x, double *out_563888458024996609);
|
||||
void pose_inv_err_fun(double *nom_x, double *true_x, double *out_2827031068694636390);
|
||||
void pose_H_mod_fun(double *state, double *out_1263436547497383287);
|
||||
void pose_f_fun(double *state, double dt, double *out_4109988172822782757);
|
||||
void pose_F_fun(double *state, double dt, double *out_1638847560690775657);
|
||||
void pose_h_4(double *state, double *unused, double *out_3140546782986528373);
|
||||
void pose_H_4(double *state, double *unused, double *out_5665086132193337519);
|
||||
void pose_h_10(double *state, double *unused, double *out_1047681176706420091);
|
||||
void pose_H_10(double *state, double *unused, double *out_7033670843842498835);
|
||||
void pose_h_13(double *state, double *unused, double *out_6433690639651374814);
|
||||
void pose_H_13(double *state, double *unused, double *out_8877359957525670320);
|
||||
void pose_h_14(double *state, double *unused, double *out_5481286407513675446);
|
||||
void pose_H_14(double *state, double *unused, double *out_2582297699897965223);
|
||||
void pose_err_fun(double *nom_x, double *delta_x, double *out_4945930081934695870);
|
||||
void pose_inv_err_fun(double *nom_x, double *true_x, double *out_2374596305757551912);
|
||||
void pose_H_mod_fun(double *state, double *out_3153056659412666736);
|
||||
void pose_f_fun(double *state, double dt, double *out_7153800947270122603);
|
||||
void pose_F_fun(double *state, double dt, double *out_4850202238034264085);
|
||||
void pose_h_4(double *state, double *unused, double *out_4636926919643642813);
|
||||
void pose_H_4(double *state, double *unused, double *out_4397217264301452827);
|
||||
void pose_h_10(double *state, double *unused, double *out_5938657236540492159);
|
||||
void pose_H_10(double *state, double *unused, double *out_4739378725964853600);
|
||||
void pose_h_13(double *state, double *unused, double *out_6396932730465810687);
|
||||
void pose_H_13(double *state, double *unused, double *out_1184943438969120026);
|
||||
void pose_h_14(double *state, double *unused, double *out_693252752994661621);
|
||||
void pose_H_14(double *state, double *unused, double *out_433976407961968298);
|
||||
void pose_predict(double *in_x, double *in_P, double *in_Q, double dt);
|
||||
}
|
||||
@@ -52,13 +52,7 @@ std::vector<std::string> PandaSafety::fetchCarParams() {
|
||||
if (!params_.getBool("ControlsReady")) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string car_params = params_.get("CarParams");
|
||||
std::string car_params_sp = params_.get("CarParamsSP");
|
||||
if (car_params.empty() || car_params_sp.empty()) {
|
||||
return {};
|
||||
}
|
||||
return {car_params, car_params_sp};
|
||||
return {params_.get("CarParams"), params_.get("CarParamsSP")};
|
||||
}
|
||||
|
||||
// TODO-SP: Use structs instead of vector
|
||||
|
||||
Binary file not shown.
@@ -57,6 +57,12 @@ class CruiseLayout(Widget):
|
||||
description=tr("Use map data to estimate the appropriate speed to drive through turns ahead."),
|
||||
param="SmartCruiseControlMap")
|
||||
|
||||
self.accel_boost_toggle = toggle_item_sp(
|
||||
title=tr("Acceleration Boost"),
|
||||
description=tr("Adds a small push on top of sunnypilot's own acceleration, stronger in Aggressive and gentler in Relaxed. " +
|
||||
"Eases off in curves and when sunnypilot slows or stops. Never goes past your set speed, and lead-car following still comes first."),
|
||||
param="AccelBoostSP")
|
||||
|
||||
self.custom_acc_toggle = toggle_item_sp(
|
||||
title=tr("Custom ACC Speed Increments"),
|
||||
description="",
|
||||
@@ -86,6 +92,7 @@ class CruiseLayout(Widget):
|
||||
self.icbm_toggle,
|
||||
self.scc_v_toggle,
|
||||
self.scc_m_toggle,
|
||||
self.accel_boost_toggle,
|
||||
self.custom_acc_toggle,
|
||||
self.custom_acc_short_increment,
|
||||
self.custom_acc_long_increment,
|
||||
@@ -136,6 +143,8 @@ class CruiseLayout(Widget):
|
||||
self.icbm_toggle.set_description(new_desc)
|
||||
self.icbm_toggle.show_description(True)
|
||||
|
||||
self.accel_boost_toggle.action_item.set_enabled(has_long)
|
||||
|
||||
if has_long or has_icbm:
|
||||
self.custom_acc_toggle.action_item.set_enabled(((has_long and not ui_state.CP.pcmCruise) or has_icbm) and ui_state.is_offroad())
|
||||
self.scc_v_toggle.action_item.set_enabled(True)
|
||||
@@ -151,6 +160,7 @@ class CruiseLayout(Widget):
|
||||
else:
|
||||
has_icbm = has_long = False
|
||||
self.icbm_toggle.action_item.set_enabled(False)
|
||||
self.accel_boost_toggle.action_item.set_enabled(False)
|
||||
self.icbm_toggle.set_description(tr(ONROAD_ONLY_DESCRIPTION))
|
||||
|
||||
show_custom_acc_desc = False
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define SUNNYPILOT_VERSION "2026.11.29-5099"
|
||||
#define SUNNYPILOT_VERSION "2026.003.000"
|
||||
|
||||
@@ -8,8 +8,6 @@ import numpy as np
|
||||
|
||||
from openpilot.common.transformations.camera import DEVICE_CAMERAS
|
||||
|
||||
MAX_CAMERA_OFFSET = 0.35 # m, the settings' range
|
||||
|
||||
|
||||
class CameraOffsetHelper:
|
||||
def __init__(self):
|
||||
@@ -36,13 +34,6 @@ class CameraOffsetHelper:
|
||||
def set_offset(self, offset):
|
||||
self.camera_offset = offset
|
||||
|
||||
def load_offset(self, params):
|
||||
offset = params.get("CameraOffset", return_default=True)
|
||||
if offset is None or not np.isfinite(offset) or abs(offset) > MAX_CAMERA_OFFSET + 1e-6: # older sunnypilot stored whole centimeters
|
||||
offset = 0.0
|
||||
params.put("CameraOffset", offset)
|
||||
self.set_offset(offset)
|
||||
|
||||
def update(self, model_transform_main, model_transform_extra, sm, main_wide_camera):
|
||||
self.actual_camera_offset = (0.9 * self.actual_camera_offset) + (0.1 * self.camera_offset)
|
||||
dc = DEVICE_CAMERAS[(str(sm['deviceState'].deviceType), str(sm['narrowRoadCameraState'].sensor))]
|
||||
|
||||
@@ -424,7 +424,7 @@ def main(demo=False):
|
||||
if sm.frame % 60 == 0:
|
||||
model.lat_delay = get_lat_delay(params, sm["lateralDelay"].lateralDelay)
|
||||
model.PLANPLUS_CONTROL = params.get("PlanplusControl", return_default=True)
|
||||
camera_offset_helper.load_offset(params)
|
||||
camera_offset_helper.set_offset(params.get("CameraOffset", return_default=True))
|
||||
blendful_enabled = params.get_bool("Blendful")
|
||||
lat_delay = model.lat_delay + model.LAT_SMOOTH_SECONDS
|
||||
if sm.updated["extrinsicsCalibration"] and sm.seen['narrowRoadCameraState'] and sm.seen['deviceState']:
|
||||
|
||||
@@ -27,18 +27,6 @@ class TestCameraOffset(OpenpilotTestCase):
|
||||
self.camera_offset = CameraOffsetHelper()
|
||||
self.dc = DEVICE_CAMERAS[('mici', 'os04c10')]
|
||||
|
||||
def test_load_offset_resets_out_of_range(self):
|
||||
class Params:
|
||||
def __init__(self, v): self.v = v
|
||||
def get(self, key, return_default=False): return self.v
|
||||
def put(self, key, v): self.v = v
|
||||
|
||||
for stored, used in ((0.2, 0.2), (-0.35, -0.35), (4.0, 0.0), (-35.0, 0.0), (float('nan'), 0.0), (None, 0.0)):
|
||||
params = Params(stored)
|
||||
self.camera_offset.load_offset(params)
|
||||
assert self.camera_offset.camera_offset == used
|
||||
assert params.v == (stored if used == stored else 0.0)
|
||||
|
||||
def test_smoothing(self):
|
||||
self.camera_offset.set_offset(0.2)
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
"""
|
||||
Copyright (c) 2021-, sunnypilot, and a number of other contributors.
|
||||
|
||||
This file is part of sunnypilot and is licensed under the MIT License.
|
||||
See the LICENSE.md file in the root directory for more details.
|
||||
"""
|
||||
import numpy as np
|
||||
|
||||
from openpilot.cereal import log
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.sunnypilot import PARAMS_UPDATE_PERIOD
|
||||
|
||||
ACCEL_BOOST_MIN_SPEED = 1.0
|
||||
ACCEL_BOOST_MAX = (0.4, 0.25, 0.1) # aggressive, standard, relaxed, m/s^2
|
||||
ACCEL_BOOST_BUILD, ACCEL_BOOST_RELEASE = 0.2, 1.0 # m/s^3
|
||||
BRAKE_PROB = (0.1, 0.3) # the model's brake press in 4 s: it wants to slow
|
||||
GAS_PROB = (0.6, 0.8) # predicts a human gas press at this hypothesis at about 23%
|
||||
CURVE_LAT_ACCEL = (1.5, 2.5)
|
||||
|
||||
|
||||
def get_boost_max(personality=log.LongitudinalPersonality.standard):
|
||||
if personality == log.LongitudinalPersonality.relaxed:
|
||||
return ACCEL_BOOST_MAX[2]
|
||||
elif personality == log.LongitudinalPersonality.standard:
|
||||
return ACCEL_BOOST_MAX[1]
|
||||
elif personality == log.LongitudinalPersonality.aggressive:
|
||||
return ACCEL_BOOST_MAX[0]
|
||||
else:
|
||||
raise NotImplementedError("Longitudinal personality not supported")
|
||||
|
||||
|
||||
class AccelBoostSP:
|
||||
def __init__(self):
|
||||
self.params = Params()
|
||||
self.frame = -1
|
||||
self.enabled = False
|
||||
self.boost = 0.0
|
||||
self.total_boost = 0.0
|
||||
|
||||
def update_params(self):
|
||||
self.frame += 1
|
||||
if self.frame % int(PARAMS_UPDATE_PERIOD / DT_MDL) != 0:
|
||||
return False
|
||||
enabled = self.params.get_bool("AccelBoostSP")
|
||||
if enabled == self.enabled:
|
||||
return False
|
||||
self.enabled = enabled
|
||||
self.boost = self.total_boost = 0.0
|
||||
return True
|
||||
|
||||
def reset(self):
|
||||
self.boost = self.total_boost = 0.0
|
||||
|
||||
def update(self, sm, output_a_target_e2e, curve_offset):
|
||||
model = sm['modelV2']
|
||||
brake_probs = model.meta.disengagePredictions.brakePressProbs
|
||||
gas_probs = model.meta.disengagePredictions.gasPressProbs
|
||||
if not sm['selfdriveState'].enabled or len(brake_probs) < 2 or len(gas_probs) < 2:
|
||||
self.boost = self.total_boost = 0.0
|
||||
return output_a_target_e2e
|
||||
|
||||
want = max(float(np.interp(brake_probs[1], BRAKE_PROB, [1.0, 0.0])), float(np.interp(gas_probs[1], GAS_PROB, [0.0, 1.0])))
|
||||
want = 0.0 if model.action.shouldStop else want
|
||||
want *= float(np.interp(abs(model.action.desiredCurvature) * sm['carState'].vEgo ** 2, CURVE_LAT_ACCEL, [1.0, 0.0]))
|
||||
target = want * get_boost_max(sm['selfdriveState'].personality)
|
||||
self.boost = float(np.clip(target, self.boost - ACCEL_BOOST_RELEASE * DT_MDL, self.boost + ACCEL_BOOST_BUILD * DT_MDL))
|
||||
speed_scale = np.interp(sm['carState'].vEgo, [ACCEL_BOOST_MIN_SPEED, 2 * ACCEL_BOOST_MIN_SPEED], [0.0, 1.0])
|
||||
self.total_boost = self.boost * speed_scale * np.interp(output_a_target_e2e, [-0.7, -0.2, 5.0], [0.0, 1.0, 1.0], right=0.0)
|
||||
return output_a_target_e2e + self.total_boost
|
||||
@@ -9,7 +9,9 @@ from openpilot.cereal import messaging, custom
|
||||
from opendbc.car import structs
|
||||
from openpilot.common.constants import CV
|
||||
from openpilot.selfdrive.car.cruise import V_CRUISE_MAX
|
||||
from openpilot.selfdrive.controls.lib.accel_boost import AccelBoost
|
||||
from openpilot.selfdrive.controls.lib.curve_speed import CurveSpeed
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.accel_boost import AccelBoostSP
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.e2e_alerts_helper import E2EAlertsHelper
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.smart_cruise_control.smart_cruise_control import SmartCruiseControl
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.speed_limit.speed_limit_assist import SpeedLimitAssist
|
||||
@@ -40,6 +42,7 @@ class LongitudinalPlannerSP:
|
||||
self.generation = int(model_bundle.generation) if (model_bundle := get_active_bundle()) else None
|
||||
self.source = LongitudinalPlanSource.cruise
|
||||
self.e2e_alerts_helper = E2EAlertsHelper()
|
||||
self.accel_boost_sp = AccelBoostSP()
|
||||
self.openpilot_longitudinal = CP.openpilotLongitudinalControl
|
||||
|
||||
self.output_v_target = 0.
|
||||
@@ -82,6 +85,8 @@ class LongitudinalPlannerSP:
|
||||
self.curve_speed = NoCurveSpeed() if scc_curves else CurveSpeed(self.dt)
|
||||
|
||||
def update(self, sm: messaging.SubMaster) -> None:
|
||||
if self.accel_boost_sp.update_params():
|
||||
self.accel_boost = self.accel_boost_sp if self.accel_boost_sp.enabled and self.openpilot_longitudinal else AccelBoost()
|
||||
self._update_curve_speed()
|
||||
|
||||
self.events_sp.clear()
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
"""
|
||||
Copyright (c) 2021-, sunnypilot, and a number of other contributors.
|
||||
|
||||
This file is part of sunnypilot and is licensed under the MIT License.
|
||||
See the LICENSE.md file in the root directory for more details.
|
||||
"""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from openpilot.common.parameterized import parameterized
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.common.test import OpenpilotTestCase
|
||||
|
||||
from openpilot.sunnypilot import PARAMS_UPDATE_PERIOD
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.accel_boost import AccelBoostSP, ACCEL_BOOST_MAX
|
||||
|
||||
|
||||
def make_sm(brake_prob=0.05, gas_prob=0.3, lat_accel=0.0, v_ego=30.0, personality=0, enabled=True, should_stop=False):
|
||||
meta = SimpleNamespace(disengagePredictions=SimpleNamespace(brakePressProbs=[0.0, brake_prob, 0.0, 0.0, 0.0, 0.0],
|
||||
gasPressProbs=[0.0, gas_prob, 0.0, 0.0, 0.0, 0.0]))
|
||||
action = SimpleNamespace(shouldStop=should_stop, desiredCurvature=lat_accel / v_ego ** 2)
|
||||
return {'modelV2': SimpleNamespace(meta=meta, action=action), 'carState': SimpleNamespace(vEgo=v_ego),
|
||||
'selfdriveState': SimpleNamespace(enabled=enabled, personality=personality)}
|
||||
|
||||
|
||||
def settle(sm, frames=100):
|
||||
boost = AccelBoostSP()
|
||||
for _ in range(frames):
|
||||
boost.update(sm, 0.0, 0.0)
|
||||
return boost.total_boost
|
||||
|
||||
|
||||
class TestAccelBoostSP(OpenpilotTestCase):
|
||||
@parameterized.expand([(0,), (1,), (2,)])
|
||||
def test_personality_max(self, personality):
|
||||
assert abs(settle(make_sm(personality=personality)) - ACCEL_BOOST_MAX[personality]) < 1e-6
|
||||
|
||||
def test_brake_gate_closes(self):
|
||||
assert settle(make_sm(brake_prob=0.5)) == 0.0
|
||||
|
||||
def test_gas_reopens(self):
|
||||
assert abs(settle(make_sm(brake_prob=0.5, gas_prob=0.9)) - ACCEL_BOOST_MAX[0]) < 1e-6
|
||||
|
||||
def test_should_stop(self):
|
||||
assert settle(make_sm(gas_prob=0.9, should_stop=True)) == 0.0
|
||||
|
||||
@parameterized.expand([(1.5, 1.0), (2.0, 0.5), (2.5, 0.0), (-2.0, 0.5)])
|
||||
def test_curve_fade(self, lat_accel, scale):
|
||||
assert abs(settle(make_sm(lat_accel=lat_accel)) - scale * ACCEL_BOOST_MAX[0]) < 1e-6
|
||||
|
||||
def test_low_speed(self):
|
||||
assert settle(make_sm(v_ego=0.5)) == 0.0
|
||||
|
||||
def test_disabled_resets(self):
|
||||
boost = AccelBoostSP()
|
||||
for _ in range(100):
|
||||
boost.update(make_sm(), 0.0, 0.0)
|
||||
assert boost.update(make_sm(enabled=False), 0.0, 0.0) == 0.0
|
||||
assert boost.boost == 0.0 and boost.total_boost == 0.0
|
||||
|
||||
def test_reset(self):
|
||||
boost = AccelBoostSP()
|
||||
for _ in range(100):
|
||||
boost.update(make_sm(), 0.0, 0.0)
|
||||
boost.reset()
|
||||
assert boost.boost == 0.0 and boost.total_boost == 0.0
|
||||
|
||||
def test_build_and_release_rates(self):
|
||||
boost = AccelBoostSP()
|
||||
boost.update(make_sm(), 0.0, 0.0)
|
||||
assert abs(boost.total_boost - 0.01) < 1e-6
|
||||
for _ in range(100):
|
||||
boost.update(make_sm(), 0.0, 0.0)
|
||||
boost.update(make_sm(brake_prob=0.5), 0.0, 0.0)
|
||||
assert abs(boost.total_boost - (ACCEL_BOOST_MAX[0] - 0.05)) < 1e-6
|
||||
|
||||
def test_param_switch(self):
|
||||
params = Params()
|
||||
boost = AccelBoostSP()
|
||||
params.put_bool("AccelBoostSP", True, block=True)
|
||||
assert boost.update_params() and boost.enabled
|
||||
for _ in range(100):
|
||||
boost.update(make_sm(), 0.0, 0.0)
|
||||
params.put_bool("AccelBoostSP", False, block=True)
|
||||
for _ in range(int(PARAMS_UPDATE_PERIOD / DT_MDL) - 1):
|
||||
assert not boost.update_params()
|
||||
assert boost.update_params() and not boost.enabled
|
||||
assert boost.boost == 0.0 and boost.total_boost == 0.0
|
||||
@@ -620,6 +620,19 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "AccelBoostSP",
|
||||
"widget": "toggle",
|
||||
"title": "Acceleration Boost",
|
||||
"description": "Adds a small push on top of sunnypilot's own acceleration, stronger in Aggressive and gentler in Relaxed. Eases off in curves and when sunnypilot slows or stops. Never goes past your set speed, and lead-car following still comes first.",
|
||||
"enablement": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "has_longitudinal_control",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "IntelligentCruiseButtonManagement",
|
||||
"widget": "toggle",
|
||||
|
||||
@@ -30,6 +30,12 @@ sections:
|
||||
label: Relaxed
|
||||
enablement:
|
||||
- $ref: '#/macros/longitudinal'
|
||||
- key: AccelBoostSP
|
||||
widget: toggle
|
||||
title: Acceleration Boost
|
||||
description: "Adds a small push on top of sunnypilot's own acceleration, stronger in Aggressive and gentler in Relaxed. Eases off in curves and when sunnypilot slows or stops. Never goes past your set speed, and lead-car following still comes first."
|
||||
enablement:
|
||||
- $ref: '#/macros/longitudinal'
|
||||
- key: IntelligentCruiseButtonManagement
|
||||
widget: toggle
|
||||
title: Intelligent Cruise Button Management (ICBM) (Alpha)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user