diff --git a/matrix/filter.hpp b/matrix/filter.hpp index 53fc99d92a..d075fc0f01 100644 --- a/matrix/filter.hpp +++ b/matrix/filter.hpp @@ -5,7 +5,7 @@ namespace matrix { template -void kalman_correct( +int kalman_correct( const SquareMatrix & P, const Matrix & C, const SquareMatrix & R, @@ -20,6 +20,7 @@ void kalman_correct( dx = K*r; beta = Scalar(r.T()*S_I*r); dP = K*C*P*(-1); + return 0; } }; // namespace matrix diff --git a/test/filter.cpp b/test/filter.cpp index b3b137cdcd..3470e5f4d4 100644 --- a/test/filter.cpp +++ b/test/filter.cpp @@ -5,7 +5,15 @@ using namespace matrix; -template class Vector; +template int kalman_correct( + const SquareMatrix & P, + const Matrix & C, + const SquareMatrix & R, + const Vector &r, + Vector & dx, + SquareMatrix & dP, + float & beta +); int main() { diff --git a/test/integration.cpp b/test/integration.cpp index e8b3889420..c1dea3b81d 100644 --- a/test/integration.cpp +++ b/test/integration.cpp @@ -5,6 +5,14 @@ using namespace matrix; +// instantiate template to ensure coverage check +template int integrate_rk4( + Vector (*f)(float, Vector), + Vector & y, + float & t, + float h +); + Vector f(float t, Vector y); Vector f(float t, Vector y) { diff --git a/test/vector2.cpp b/test/vector2.cpp index e1d122fbde..d9c63ed71f 100644 --- a/test/vector2.cpp +++ b/test/vector2.cpp @@ -5,7 +5,7 @@ using namespace matrix; -template class Vector; +template class Vector; int main() {