Skip to content

Commit cb15280

Browse files
mkschrederLorenzMeier
authored andcommitted
Update Matrix.hpp (#4966)
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.
1 parent 403d76c commit cb15280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/mathlib/math/Matrix.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class __EXPORT MatrixBase
305305
* transpose the matrix
306306
*/
307307
Matrix<N, M> transposed(void) const {
308-
matrix::Matrix<float, N, M> Me(this->arm_mat.pData);
308+
matrix::Matrix<float, M, N> Me(this->arm_mat.pData);
309309
Matrix<N, M> res(Me.transpose().data());
310310
return res;
311311
}

0 commit comments

Comments
 (0)