Skip to content

Fixed bugs introduced while converting from Python to C++ #129

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions deploy/OCSort/cpp/src/KalmanFilter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../include/KalmanFilter.hpp"
#include "../include/KalmanFilter.hpp"
#include <iostream>
namespace ocsort {
KalmanFilterNew::KalmanFilterNew() {};
Expand Down Expand Up @@ -26,7 +26,7 @@ namespace ocsort {
};
void KalmanFilterNew::predict() {
x = F * x;
P = _alpha_sq * ((F * P), F.transpose()) + Q;
P = _alpha_sq * ((F * P) * F.transpose()) + Q;
x_prior = x;
P_prior = P;
}
Expand All @@ -46,6 +46,7 @@ namespace ocsort {
y = *z_ - H * x;
auto PHT = P * H.transpose();
S = H * PHT + R;
SI = S.inverse();
K = PHT * SI;
x = x + K * y;
auto I_KH = I - K * H;
Expand Down Expand Up @@ -152,4 +153,4 @@ namespace ocsort {
}
}
}
}// namespace ocsort
}// namespace ocsort