diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-25 20:31:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-25 20:31:34 +0200 |
commit | 2bae0bce582f05259f64fb13b364fe6dbd28817a (patch) | |
tree | f16ab786537944376700db6d8088b219d1d35bc9 | |
parent | efe517e6fa8001c2f77f95fe687663c31392ebe3 (diff) |
logic/tracker: fix compensation for real this time
-rw-r--r-- | opentrack-logic/tracker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opentrack-logic/tracker.cpp b/opentrack-logic/tracker.cpp index b16da9aa..a1f206a1 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" |