Skip to content

Commit

Permalink
Fixed hard coded value in EKF.
Browse files Browse the repository at this point in the history
  • Loading branch information
iandareid committed Jul 12, 2024
1 parent f2761da commit 99def8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosplane/src/estimator_ekf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ std::tuple<Eigen::MatrixXf, Eigen::VectorXf> EstimatorEKF::propagate_model(Eigen

std::tuple<Eigen::MatrixXf, Eigen::VectorXf> EstimatorEKF::single_measurement_update(float measurement, float measurement_prediction, float measurement_variance, Eigen::VectorXf measurement_jacobian, Eigen::VectorXf x, Eigen::MatrixXf P)
{
Eigen::MatrixXf I(7,7);
Eigen::MatrixXf I(x.size(),x.size());
I = Eigen::MatrixXf::Identity(x.size(), x.size());
Eigen::VectorXf L = (P * measurement_jacobian) / (measurement_variance + (measurement_jacobian.transpose() * P * measurement_jacobian));
P = (I - L * measurement_jacobian.transpose()) * P;
Expand Down

0 comments on commit 99def8f

Please sign in to comment.