summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-25 11:48:17 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-25 13:20:12 +0200
commit4343254e4a03325e6fc562ac8167065a6fc18e9e (patch)
tree3089a054eccb9767dc9dbf5775f06bf2466b0576
parentd6b5f94670a7c32d9ca21df57c792f7c5fe1aa03 (diff)
logic/{simple-mat,tracker}: fix translation compensation signs
They didn't match between rotation and translation again.
-rw-r--r--opentrack-logic/simple-mat.cpp2
-rw-r--r--opentrack-logic/tracker.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/opentrack-logic/simple-mat.cpp b/opentrack-logic/simple-mat.cpp
index 748e083b..6397ed4e 100644
--- a/opentrack-logic/simple-mat.cpp
+++ b/opentrack-logic/simple-mat.cpp
@@ -26,7 +26,7 @@ rmat OPENTRACK_LOGIC_EXPORT euler_to_rmat(const euler_t& input)
{
const double H = input(0);
const double P = input(1);
- const double B = -input(2);
+ const double B = input(2);
using std::cos;
using std::sin;
diff --git a/opentrack-logic/tracker.cpp b/opentrack-logic/tracker.cpp
index a1f206a1..b16da9aa 100644
--- a/opentrack-logic/tracker.cpp
+++ b/opentrack-logic/tracker.cpp
@@ -64,13 +64,13 @@ double Tracker::map(double pos, Mapping& axis)
void Tracker::t_compensate(const rmat& rmat, const euler_t& xyz_, euler_t& output, bool rz)
{
// TY is really yaw axis. need swapping accordingly.
- const euler_t ret = rmat * euler_t(xyz_(TZ), -xyz_(TX), -xyz_(TY));
+ const euler_t ret = rmat * euler_t(xyz_(TZ), xyz_(TX), xyz_(TY));
if (!rz)
output(2) = ret(0);
else
output(2) = xyz_(2);
- output(1) = -ret(2);
- output(0) = -ret(1);
+ output(1) = ret(2);
+ output(0) = ret(1);
}
#include "opentrack-compat/nan.hpp"