summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-09 04:04:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-09 04:06:07 +0200
commit573a78eeda6423ff4ce72dda9f00c366b20672d5 (patch)
tree9c460f445b6679e24efb699149389c8424c64dff
parent1e6f070677ebcf2649924f682aa66b939fa874f8 (diff)
main: apply center pose after compensation
Issue: #212
-rwxr-xr-x[-rw-r--r--]opentrack/tracker.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index acbfded5..f31e1185 100644..100755
--- 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.;