mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 15:33:33 +08:00
Added better roundtrip euler test.
This commit is contained in:
+6
-6
@@ -64,12 +64,12 @@ public:
|
||||
|
||||
Dcm(const Euler<Type> & euler) {
|
||||
Dcm &dcm = *this;
|
||||
Type cosPhi = cosf(euler.phi());
|
||||
Type sinPhi = sinf(euler.phi());
|
||||
Type cosThe = cosf(euler.theta());
|
||||
Type sinThe = sinf(euler.theta());
|
||||
Type cosPsi = cosf(euler.psi());
|
||||
Type sinPsi = sinf(euler.psi());
|
||||
Type cosPhi = Type(cos(euler.phi()));
|
||||
Type sinPhi = Type(sin(euler.phi()));
|
||||
Type cosThe = Type(cos(euler.theta()));
|
||||
Type sinThe = Type(sin(euler.theta()));
|
||||
Type cosPsi = Type(cos(euler.psi()));
|
||||
Type sinPsi = Type(sin(euler.psi()));
|
||||
|
||||
dcm(0, 0) = cosThe * cosPsi;
|
||||
dcm(0, 1) = -cosPhi * sinPsi + sinPhi * sinThe * cosPsi;
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public:
|
||||
bool operator==(const Matrix<Type, M, N> &other) const
|
||||
{
|
||||
const Matrix<Type, M, N> &self = *this;
|
||||
static const Type eps = Type(1e-6);
|
||||
static const Type eps = Type(1e-4);
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
|
||||
Reference in New Issue
Block a user