From 05f3b96338e3f0a5c9fea8a4fffd690479fbf701 Mon Sep 17 00:00:00 2001 From: Aniol Garcia <aniolgarcia@gmail.com> Date: Wed, 9 Oct 2019 19:26:44 +0200 Subject: [PATCH] Fixing some matrix dimension tests --- src/kalman_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kalman_cpp.cpp b/src/kalman_cpp.cpp index 86770b9..0501e02 100644 --- a/src/kalman_cpp.cpp +++ b/src/kalman_cpp.cpp @@ -81,7 +81,7 @@ void CKalman_Cpp::set_control_input_matrix(const Eigen::MatrixXd &B) void CKalman_Cpp::set_measurement_matrix(const Eigen::MatrixXd &H) { - if(H.cols() == this->dimension && H.rows() == this->dimension) + if(H.cols() == this->dimension && H.rows() == this->observation_dimension) { this->H = H; } @@ -105,7 +105,7 @@ void CKalman_Cpp::set_process_noise_matrix(const Eigen::MatrixXd &Q) void CKalman_Cpp::set_measurement_noise_matrix(const Eigen::MatrixXd &R) { - if(R.cols() == this->dimension &&R.rows() == this->dimension) + if(R.cols() == this->observation_dimension &&R.rows() == this->observation_dimension) { this-> R = R; } -- GitLab