In the file kalman_filter.cpp, there is the following duplicated code inside the function reset_kalman:
memcpy(filter->x_bar_data, x_dash, sizeof(x_dash));
memcpy(filter->x_bar_data, x_dash, sizeof(x_dash));
memcpy(filter->P_bar_data, P_dash, sizeof(P_dash));
memcpy(filter->P_bar_data, P_dash, sizeof(P_dash));
Comparing it with the soft_reset_kalman function, it is possible that the duplicated memcpy calls are meant to reset P_hat_data and x_hat_data, instead of resetting again x_bar_data and P_bar_data.
In the file
kalman_filter.cpp, there is the following duplicated code inside the functionreset_kalman:Comparing it with the
soft_reset_kalmanfunction, it is possible that the duplicated memcpy calls are meant to resetP_hat_dataandx_hat_data, instead of resetting againx_bar_dataandP_bar_data.