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.
This commit is contained in:
Martin K. Schröder
2016-07-03 12:29:58 +02:00
committed by Lorenz Meier
parent 403d76c7a7
commit cb1528008f
+1 -1
View File
@@ -305,7 +305,7 @@ public:
* 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;
}