From bc0bcee05ec795ba27c699ad2b2bb2ef0a213148 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 27 Oct 2013 02:55:05 +0200 Subject: add Accela deadzone, Patrick was right! Signed-off-by: Stanislaw Halik --- ftnoir_filter_accela/ftnoir_filter_accela.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index 781b3ba0..1168004f 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -5,6 +5,7 @@ * copyright notice and this permission notice appear in all copies. */ #include "ftnoir_filter_accela/ftnoir_filter_accela.h" +#include #include #include #include @@ -65,7 +66,7 @@ void FTNoIR_Filter::receiveSettings(double rot, double trans, double zoom_fac) static inline double parabola(const double a, const double x) { const double a1 = 1./a; - return a1 * pow(x, 2.025); + return a1 * pow(std::max(x - 0.175, 1e-5), 2.2); } void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position, -- cgit v1.2.3