From cca730a8d311f099d1b58ecd04051b612ae3ef72 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 9 May 2022 19:14:32 +0200 Subject: tracker/{pt-base,trackhat}: add variable deadzone factor --- tracker-pt/point-filter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tracker-pt/point-filter.cpp') diff --git a/tracker-pt/point-filter.cpp b/tracker-pt/point-filter.cpp index b03562ed..10448fe2 100644 --- a/tracker-pt/point-filter.cpp +++ b/tracker-pt/point-filter.cpp @@ -10,7 +10,7 @@ void point_filter::reset() t = std::nullopt; } -const PointOrder& point_filter::operator()(const PointOrder& input) +const PointOrder& point_filter::operator()(const PointOrder& input, f deadzone_amount) { using std::fmod; using std::sqrt; @@ -40,7 +40,7 @@ const PointOrder& point_filter::operator()(const PointOrder& input) return A * pow((f)10, (f)-log10_pos) * rest; ); - f dist = 0, dz = (float)s.point_filter_deadzone / 800; // sqrt(640^2 + 480^2) + f dist = 0, dz = deadzone_amount * (f)s.point_filter_deadzone / 800; // sqrt(640^2 + 480^2) for (unsigned i = 0; i < 3; i++) { -- cgit v1.2.3