mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 11:59:07 +08:00
update matrix and fix test_matrix (#6524)
This commit is contained in:
parent
7a77e27a79
commit
9bc5da6d2d
@ -1 +1 @@
|
||||
Subproject commit c31686379c7bbeacb469c3407b5e4ef159098c9c
|
||||
Subproject commit e2211c586714d0c3175d5d38c28d7f1f677d64a3
|
||||
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user