Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated memcpy in reset_kalman #384

Open
IlBako opened this issue Jun 14, 2024 · 0 comments
Open

Duplicated memcpy in reset_kalman #384

IlBako opened this issue Jun 14, 2024 · 0 comments

Comments

@IlBako
Copy link

IlBako commented Jun 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant