From 573a78eeda6423ff4ce72dda9f00c366b20672d5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 9 Aug 2015 04:04:32 +0200 Subject: main: apply center pose after compensation Issue: #212 --- opentrack/tracker.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 opentrack/tracker.cpp (limited to 'opentrack') diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp old mode 100644 new mode 100755 index acbfded5..f31e1185 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -46,7 +46,7 @@ double Tracker::map(double pos, Mapping& axis) axis.curve.setTrackingActive( !altp ); axis.curveAlt.setTrackingActive( altp ); auto& fc = altp ? axis.curveAlt : axis.curve; - return fc.getValue(pos) + axis.opts.zero; + return fc.getValue(pos); } void Tracker::t_compensate(const rmat& rmat, const double* xyz, double* output, bool rz) @@ -149,7 +149,7 @@ void Tracker::logic() if (libs.pFilter) libs.pFilter->filter(tmp, value); } - + for (int i = 0; i < 6; i++) value(i) = map(value(i), m(i)); @@ -158,7 +158,10 @@ void Tracker::logic() value, value, s.tcomp_tz); - + + for (int i = 0; i < 6; i++) + value(i) += m(i).opts.zero; + for (int i = 0; i < 6; i++) value[i] *= inverts[i] ? -1. : 1.; -- cgit v1.2.3