Added better roundtrip euler test.

This commit is contained in:
James Goppert
2016-01-24 00:39:21 -05:00
parent cc2804d6a6
commit ffbe58ca10
3 changed files with 35 additions and 19 deletions
+6 -6
View File
@@ -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
View File
@@ -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++) {