Skip to content

Duplicated memcpy in reset_kalman #384

@IlBako

Description

@IlBako

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions