Skip to content

Commit

Permalink
Update Matrix.hpp (#4966)
Browse files Browse the repository at this point in the history
This was horribly wrong. Matrix is first cast into a matrix of size NxM (which is supposed to be the size of the result - NOT the starting point) so the transpose result becomes garbage. Instead make "Me" an MxN matrix as the original. Took me a whole evening to figure out this problem. Now my Kalman filter finally returns good results.
  • Loading branch information
mkschreder authored and LorenzMeier committed Jul 3, 2016
1 parent 403d76c commit cb15280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/mathlib/math/Matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class __EXPORT MatrixBase
* transpose the matrix
*/
Matrix<N, M> transposed(void) const {
matrix::Matrix<float, N, M> Me(this->arm_mat.pData);
matrix::Matrix<float, M, N> Me(this->arm_mat.pData);
Matrix<N, M> res(Me.transpose().data());
return res;
}
Expand Down

0 comments on commit cb15280

Please sign in to comment.