diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 07:07:10 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 05:07:40 +0000 |
commit | bb7a4fd91a8ad870ca98454141d09ec39b937259 (patch) | |
tree | d34fefe2fd67ae37714b902fbdbadb9eed73a412 /tracker-rift-140/rift-140.cpp | |
parent | c09e9d54535dfb08fdb26171a4eaa548a566eba4 (diff) |
tracker/rift: remove old yaw spring code
Diffstat (limited to 'tracker-rift-140/rift-140.cpp')
-rw-r--r-- | tracker-rift-140/rift-140.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tracker-rift-140/rift-140.cpp b/tracker-rift-140/rift-140.cpp index ee309ce8..839dd190 100644 --- a/tracker-rift-140/rift-140.cpp +++ b/tracker-rift-140/rift-140.cpp @@ -80,23 +80,13 @@ void rift_tracker_140::data(double *data) pitch *= c_mult; roll *= c_mult; - double yaw_ = double(yaw); - if (s.useYawSpring) - { - yaw_ = old_yaw*s.persistence + (yaw_-old_yaw); - if(yaw_ > s.deadzone) - yaw_ -= s.constant_drift; - if(yaw_ < -s.deadzone) - yaw_ += s.constant_drift; - old_yaw = yaw_; - } constexpr double d2r = 180 / M_PI; - data[Yaw] = yaw_ * -d2r; - data[Pitch] = double(pitch) * d2r; - data[Roll] = double(roll) * d2r; - data[TX] = double(pose.Translation.x) * -1e2; - data[TY] = double(pose.Translation.y) * 1e2; - data[TZ] = double(pose.Translation.z) * 1e2; + data[Yaw] = double(yaw) * -d2r; + data[Pitch] = double(pitch) * d2r; + data[Roll] = double(roll) * d2r; + data[TX] = double(pose.Translation.x) * -1e2; + data[TY] = double(pose.Translation.y) * 1e2; + data[TZ] = double(pose.Translation.z) * 1e2; } } } |