mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
update matrix and fix test_matrix (#6524)
This commit is contained in:
Submodule src/lib/matrix updated: c31686379c...e2211c5867
@@ -4,6 +4,7 @@
|
||||
#include <matrix/math.hpp>
|
||||
#include <matrix/filter.hpp>
|
||||
#include <matrix/integration.hpp>
|
||||
#include <matrix/Quaternion.hpp>
|
||||
|
||||
using namespace matrix;
|
||||
|
||||
@@ -58,10 +59,10 @@ bool MatrixTest::run_tests()
|
||||
|
||||
ut_declare_test_c(test_matrix, MatrixTest)
|
||||
|
||||
|
||||
template class matrix::Quaternion<float>;
|
||||
template class matrix::Euler<float>;
|
||||
template class matrix::Dcm<float>;
|
||||
using matrix::Dcmf;
|
||||
using matrix::Quatf;
|
||||
using matrix::Eulerf;
|
||||
using matrix::Vector3f;
|
||||
|
||||
bool MatrixTest::attitudeTests()
|
||||
{
|
||||
@@ -207,11 +208,10 @@ bool MatrixTest::attitudeTests()
|
||||
ut_test(isEqual(q_from_m, m4));
|
||||
|
||||
// quaternion derivate
|
||||
Vector<float, 4> q_dot = q.derivative(Vector3f(1, 2, 3));
|
||||
Vector<float, 4> q_dot = q.derivative1(Vector3f(1, 2, 3));
|
||||
|
||||
// quaternion product
|
||||
Quatf q_prod_check(
|
||||
0.93394439f, 0.0674002f, 0.20851f, 0.28236266f);
|
||||
Quatf q_prod_check(0.93394439f, 0.0674002f, 0.20851f, 0.28236266f);
|
||||
ut_test(isEqual(q_prod_check, q_check * q_check));
|
||||
q_check *= q_check;
|
||||
ut_test(isEqual(q_prod_check, q_check));
|
||||
|
||||
Reference in New Issue
Block a user