summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-12 01:45:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-12 01:50:00 +0200
commite50e44a55d871f1d4bcafc20377291324d931286 (patch)
treec47e5bce515d551d4c0809518c786ca0558f62f4
parent288d9d1024e08b203e06a01cb23b0e971c78c260 (diff)
matrix -> euler: prevent gimbal lock multiple solutions harder
-rw-r--r--logic/tracker.h2
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.cpp2
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_080.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/logic/tracker.h b/logic/tracker.h
index 4295822e..754a836c 100644
--- a/logic/tracker.h
+++ b/logic/tracker.h
@@ -99,7 +99,7 @@ private:
static constexpr double d2r = M_PI / 180.;
// note: float exponent base is 2
- static constexpr double c_mult = 4;
+ static constexpr double c_mult = 16;
static constexpr double c_div = 1./c_mult;
public:
Tracker(Mappings& m, SelectedLibraries& libs, TrackLogger& logger);
diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
index a25288fa..1047957a 100644
--- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp
+++ b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
@@ -67,7 +67,7 @@ void rift_tracker_042::data(double *data)
ovrTrackingState ss = ovrHmd_GetTrackingState(hmd, 0);
if (ss.StatusFlags & ovrStatus_OrientationTracked)
{
- static constexpr float c_mult = 8;
+ static constexpr float c_mult = 16;
static constexpr float c_div = 1/c_mult;
Vector3f axis;
diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.cpp b/tracker-rift-080/ftnoir_tracker_rift_080.cpp
index 98edcb4f..4218511d 100644
--- a/tracker-rift-080/ftnoir_tracker_rift_080.cpp
+++ b/tracker-rift-080/ftnoir_tracker_rift_080.cpp
@@ -76,7 +76,7 @@ void rift_tracker_080::data(double *data)
ovrTrackingState ss = ovr_GetTrackingState(hmd, 0, false);
if (ss.StatusFlags & ovrStatus_OrientationTracked)
{
- static constexpr float c_mult = 8;
+ static constexpr float c_mult = 16;
static constexpr float c_div = 1/c_mult;
Vector3f axis;