diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-28 08:37:28 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-28 08:58:40 +0100 |
commit | 5114e97eb6201f381ded886b2d360524b5189a75 (patch) | |
tree | 7e63698f881b2895ef9caf8fdf77e7aef155d3db /logic/pipeline.cpp | |
parent | 9911d062318256b3e6c494a132c7b77df98f3125 (diff) |
logic/pipeline: kill clamp_value()
Diffstat (limited to 'logic/pipeline.cpp')
-rw-r--r-- | logic/pipeline.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 130b7eff..2b3d9313 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -287,22 +287,6 @@ void pipeline::maybe_set_center_pose(const Pose& value, bool own_center_logic) } } -Pose pipeline::clamp_value(Pose value) const -{ - // hatire, udp, and freepie trackers can mess up here - for (unsigned i = 3; i < 6; i++) - { - value(i) = std::fmod(value(i), 360); - - const double x = value(i); - if (std::fabs(x) - 1e-2 > 180) - value(i) = std::fmod(x + std::copysign(180, x), 360) - std::copysign(180, x); - value(i) = clamp(x, -180, 180); - } - - return value; -} - Pose pipeline::apply_center(Pose value) const { // this is incorrect but people like it @@ -406,12 +390,10 @@ void pipeline::logic() nan_check(newpose, raw, value); - value = clamp_value(value); - { maybe_enable_center_on_tracking_started(); maybe_set_center_pose(value, own_center_logic); - value = clamp_value(apply_center(value)); + value = apply_center(value); // "corrected" - after various transformations to account for camera position logger.write_pose(value); |