summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-30 17:09:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-30 17:09:12 +0100
commit8b3838e6e744bd1dfff290bf56ee4543bc442526 (patch)
tree3a4d14a4498d326fbd45f37b9c95bd790f4ed7f9
parent2435ad93423ee3ce3b262000854666adc5f51386 (diff)
Revert "Added positional tracking?!"
This reverts commit 8b3285917eeb228e9811df75568d927b763644cf. Requested-by: mm0zct
-rw-r--r--ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui127
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.cpp22
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.h4
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp4
4 files changed, 9 insertions, 148 deletions
diff --git a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
index 8250580d..e868a9c3 100644
--- a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
+++ b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
@@ -150,136 +150,9 @@
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
-
-
- <item row="0" column="1">
- <widget class="QGroupBox" name="groupBox_tx3">
- <property name="title">
- <string>Enable Translation Axis</string>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <layout class="QFormLayout" name="formLayout_tx2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_tx6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>TX:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_tx9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>TY:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_tx11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>TZ:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
-
-
-
-
-
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
index 45c02cfb..dd78bf9f 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
@@ -88,23 +88,11 @@ bool Rift_Tracker::GiveHeadPoseData(double *data)
if(newHeadPose[Yaw]<-deadzone)newHeadPose[Yaw]+= constant_drift;
old_yaw=yaw;
}
-#if 1
-
- double dt = 0.015;
-
- OVR::Vector3f acc = pSFusion->GetAcceleration();
- old_x = old_x*persistence + vx*dt + 0.5*(acc.x*acc.x);
- vx = vx*persistence + acc.x*dt;
- newHeadPose[TX] = old_x;
-
- old_y = old_y*persistence + vy*dt + 0.5*(acc.y*acc.y);
- vy = vy*persistence + acc.y*dt;
- newHeadPose[TY] = old_y;
-
- old_z = old_z*persistence + vz*dt + 0.5*(acc.z*acc.z);
- vz = vz*persistence + acc.z*dt;
- newHeadPose[TZ] = old_z;
-
+#if 0
+ newHeadPose[TX] = acd.controllers[0].pos[0]/50.0f;
+ newHeadPose[TY] = acd.controllers[0].pos[1]/50.0f;
+ newHeadPose[TZ] = acd.controllers[0].pos[2]/50.0f;
+
if (bEnableX) {
data[TX] = newHeadPose[TX];
}
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
index 93b03b97..7a4533d3 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
@@ -30,13 +30,13 @@ private:
bool bEnableRoll;
bool bEnablePitch;
bool bEnableYaw;
-#if 1
+#if 0
bool bEnableX;
bool bEnableY;
bool bEnableZ;
#endif
bool useYawSpring;
- double old_yaw, constant_drift, persistence, deadzone, old_x, old_y, old_z, vx, vy, vz;
+ double old_yaw, constant_drift, persistence, deadzone;
};
// Widget that has controls for FTNoIR protocol client-settings.
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
index 901a0192..2efefbb3 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
@@ -112,7 +112,7 @@ void TrackerControls::loadSettings() {
ui.chkEnableRoll->setChecked(iniFile.value ( "EnableRoll", 1 ).toBool());
ui.chkEnablePitch->setChecked(iniFile.value ( "EnablePitch", 1 ).toBool());
ui.chkEnableYaw->setChecked(iniFile.value ( "EnableYaw", 1 ).toBool());
-#if 1
+#if 0
ui.chkEnableX->setChecked(iniFile.value ( "EnableX", 1 ).toBool());
ui.chkEnableY->setChecked(iniFile.value ( "EnableY", 1 ).toBool());
ui.chkEnableZ->setChecked(iniFile.value ( "EnableZ", 1 ).toBool());
@@ -139,7 +139,7 @@ void TrackerControls::save() {
iniFile.setValue ( "EnableRoll", ui.chkEnableRoll->isChecked() );
iniFile.setValue ( "EnablePitch", ui.chkEnablePitch->isChecked() );
iniFile.setValue ( "EnableYaw", ui.chkEnableYaw->isChecked() );
-#if 1
+#if 0
iniFile.setValue ( "EnableX", ui.chkEnableX->isChecked() );
iniFile.setValue ( "EnableY", ui.chkEnableY->isChecked() );
iniFile.setValue ( "EnableZ", ui.chkEnableZ->isChecked() );