summaryrefslogtreecommitdiffhomepage
path: root/filter-accela
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-04 15:19:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-04 15:20:45 +0200
commitf1b7f2f8d0b508baa39b554e86d5499637681101 (patch)
tree3bc132948353ffe8509961160a57468e137536c2 /filter-accela
parentffd73cbc1ffd86b65fd2a0ab1290a76d175cb056 (diff)
filter/accela: fix nonlinearity formula
Diffstat (limited to 'filter-accela')
-rw-r--r--filter-accela/ftnoir_accela_filtercontrols.ui2
-rw-r--r--filter-accela/ftnoir_filter_accela.cpp2
-rw-r--r--filter-accela/ftnoir_filter_accela.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui
index 2b568913..3a3f43d8 100644
--- a/filter-accela/ftnoir_accela_filtercontrols.ui
+++ b/filter-accela/ftnoir_accela_filtercontrols.ui
@@ -349,7 +349,7 @@
<number>0</number>
</property>
<property name="maximum">
- <number>75</number>
+ <number>100</number>
</property>
<property name="value">
<number>0</number>
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp
index 4f6dafb8..09472f35 100644
--- a/filter-accela/ftnoir_filter_accela.cpp
+++ b/filter-accela/ftnoir_filter_accela.cpp
@@ -96,7 +96,7 @@ void FTNoIR_Filter::filter(const double* input, double *output)
const double thres = i >= 3 ? rot_t : trans_t;
const double out_ = vec_ / thres;
const double out = i >= 3 && std::fabs(rot_nl - 1) > 5e-3
- ? (out_ * std::min(1., std::pow(out_/s.max_rot_nl, rot_nl)) * s.max_rot_nl)
+ ? (std::pow(out_/s.max_rot_nl, rot_nl) * s.max_rot_nl)
: out_;
const double val = m.getValue(float(out));
const double signum = int(vec < 0) * -2 + 1;
diff --git a/filter-accela/ftnoir_filter_accela.h b/filter-accela/ftnoir_filter_accela.h
index 3f504767..b347c30b 100644
--- a/filter-accela/ftnoir_filter_accela.h
+++ b/filter-accela/ftnoir_filter_accela.h
@@ -33,7 +33,7 @@ struct settings_accela : opts
ewma(b, "ewma", 2),
rot_deadzone(b, "rotation-deadzone", 0),
trans_deadzone(b, "translation-deadzone", 0),
- rot_nonlinearity(b, "rotation-nonlinearity", slider_value(1.1, 1, 1.75))
+ rot_nonlinearity(b, "rotation-nonlinearity", slider_value(1, 1, 2))
{}
};