summaryrefslogtreecommitdiffhomepage
path: root/opentrack/tracker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-06 10:41:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-06 10:41:11 +0200
commit945b229861a6e8eb24083ddd97017eaa9e74573e (patch)
tree8f12a77a049946864f3761600373c86e8b620617 /opentrack/tracker.cpp
parent23afc7945f7058224b656c13572b2e97fc1da8b9 (diff)
tracker: revert to filtering before mapping
As a side effect, current position on mapping graphs no longer jumps around.
Diffstat (limited to 'opentrack/tracker.cpp')
-rw-r--r--opentrack/tracker.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index 1990d613..c124111f 100644
--- a/opentrack/tracker.cpp
+++ b/opentrack/tracker.cpp
@@ -97,8 +97,8 @@ void Tracker::logic()
}
const double off[] = {
- (double)s.camera_yaw,
- (double)s.camera_pitch,
+ (double)-s.camera_yaw,
+ (double)-s.camera_pitch,
(double)s.camera_roll
};
const rmat cam = rmat::euler_to_rmat(off);
@@ -140,25 +140,22 @@ void Tracker::logic()
}
}
- for (int i = 3; i < 6; i++)
- value(i) = map(value(i), m(i));
-
{
Pose tmp = value;
if (libs.pFilter)
libs.pFilter->filter(tmp, value);
}
-
+
+ for (int i = 0; i < 6; i++)
+ value(i) = map(value(i), m(i));
+
if (s.tcomp_p)
t_compensate(rmat::euler_to_rmat(&value[Yaw]),
value,
value,
s.tcomp_tz);
- for (int i = 0; i < 3; i++)
- value(i) = map(value(i), m(i));
-
for (int i = 0; i < 6; i++)
value[i] *= inverts[i] ? -1. : 1.;