summaryrefslogtreecommitdiffhomepage
path: root/filter-ewma2
diff options
context:
space:
mode:
Diffstat (limited to 'filter-ewma2')
-rw-r--r--filter-ewma2/ftnoir_ewma_filtercontrols.ui24
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2.cpp39
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2.h21
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2_dialog.cpp28
-rw-r--r--filter-ewma2/lang/de_DE.ts72
-rw-r--r--filter-ewma2/lang/nl_NL.ts11
-rw-r--r--filter-ewma2/lang/ru_RU.ts11
-rw-r--r--filter-ewma2/lang/stub.ts11
-rw-r--r--filter-ewma2/lang/zh_CN.ts72
9 files changed, 203 insertions, 86 deletions
diff --git a/filter-ewma2/ftnoir_ewma_filtercontrols.ui b/filter-ewma2/ftnoir_ewma_filtercontrols.ui
index d5cc082e..513a8ec3 100644
--- a/filter-ewma2/ftnoir_ewma_filtercontrols.ui
+++ b/filter-ewma2/ftnoir_ewma_filtercontrols.ui
@@ -23,7 +23,7 @@
<string>EWMA filter settings</string>
</property>
<property name="windowIcon">
- <iconset resource="../gui/ui-res.qrc">
+ <iconset resource="../gui/opentrack-res.qrc">
<normaloff>:/images/filter-16.png</normaloff>:/images/filter-16.png</iconset>
</property>
<property name="layoutDirection">
@@ -73,7 +73,7 @@
<number>0</number>
</property>
<property name="maximum">
- <number>1000</number>
+ <number>990</number>
</property>
<property name="singleStep">
<number>5</number>
@@ -82,7 +82,7 @@
<number>50</number>
</property>
<property name="value">
- <number>1000</number>
+ <number>990</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -123,10 +123,10 @@
</sizepolicy>
</property>
<property name="minimum">
- <number>1</number>
+ <number>0</number>
</property>
<property name="maximum">
- <number>1000</number>
+ <number>990</number>
</property>
<property name="singleStep">
<number>5</number>
@@ -135,7 +135,7 @@
<number>50</number>
</property>
<property name="value">
- <number>1000</number>
+ <number>980</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -173,7 +173,7 @@
<number>0</number>
</property>
<property name="maximum">
- <number>1000</number>
+ <number>2450</number>
</property>
<property name="singleStep">
<number>5</number>
@@ -182,7 +182,7 @@
<number>50</number>
</property>
<property name="value">
- <number>1000</number>
+ <number>490</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -245,10 +245,6 @@
</item>
<item>
<widget class="QLabel" name="label_4">
- <property name="styleSheet">
- <string notr="true">background-color: rgb(214, 214, 214);
-border-color: rgb(0, 0, 0);</string>
- </property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
@@ -257,7 +253,7 @@ border-color: rgb(0, 0, 0);</string>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:600;&quot;&gt;Give the filter up to 60 seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
@@ -287,7 +283,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<resources>
- <include location="../gui/ui-res.qrc"/>
+ <include location="../gui/opentrack-res.qrc"/>
</resources>
<connections/>
<slots>
diff --git a/filter-ewma2/ftnoir_filter_ewma2.cpp b/filter-ewma2/ftnoir_filter_ewma2.cpp
index 687b5589..686552ba 100644
--- a/filter-ewma2/ftnoir_filter_ewma2.cpp
+++ b/filter-ewma2/ftnoir_filter_ewma2.cpp
@@ -22,36 +22,36 @@
// to minSmooth at a rate controlled by the powCurve setting.
-ewma::ewma() : first_run(true)
-{
-}
+ewma::ewma() = default;
void ewma::filter(const double *input, double *output)
{
+ static constexpr double full_turn = 360;
+ static constexpr double half_turn = 180;
// Start the timer and initialise filter state if it's not running.
if (first_run)
{
first_run = false;
timer.start();
- for (int i=0;i<6;i++)
- {
- last_output[i] = input[i];
- last_delta[i] = 0;
- last_noise[i] = 0;
- }
+ noise_RC = 0.0;
+ std::copy(input, input + 6, last_output);
+ std::fill(last_delta, last_delta + 6, 0.0);
+ std::fill(last_noise, last_noise + 6, 0.0);
+ return;
}
// Get the time in seconds since last run and restart the timer.
const double dt = timer.elapsed_seconds();
timer.start();
// Calculate delta_alpha and noise_alpha from dt.
+ noise_RC = std::min(noise_RC + dt, noise_RC_max);
double delta_alpha = dt/(dt + delta_RC);
double noise_alpha = dt/(dt + noise_RC);
// scale curve .01->1 where 1.0 is sqrt(norm_noise).
- const double smoothing_scale_curve = static_cast<slider_value>(s.kSmoothingScaleCurve);
+ const double smoothing_scale_curve = *s.kSmoothingScaleCurve;
// min/max smoothing .01->1
- const double min_smoothing = static_cast<slider_value>(s.kMinSmoothing);
- const double max_smoothing = std::max(min_smoothing, static_cast<slider_value>(s.kMaxSmoothing).cur());
+ const double min_smoothing{s.kMinSmoothing};
+ const double max_smoothing = std::fmax(min_smoothing, *s.kMaxSmoothing);
// Calculate the new camera position.
for (int i=0;i<6;i++)
@@ -59,20 +59,27 @@ void ewma::filter(const double *input, double *output)
using std::pow;
// Calculate the current and smoothed delta.
- double delta = input[i] - last_output[i];
- last_delta[i] = delta_alpha*delta + (1.0-delta_alpha)*last_delta[i];
+ double input_value = input[i];
+ double delta = input_value - last_output[i];
+ if (i >= 3 && fabs(delta) > half_turn)
+ {
+ delta -= copysign(full_turn, delta);
+ input_value -= copysign(full_turn, input_value);
+ }
+ last_delta[i] += delta_alpha * (delta - last_delta[i]);
// Calculate the current and smoothed noise variance.
double noise = last_delta[i]*last_delta[i];
last_noise[i] = noise_alpha*noise + (1.0-noise_alpha)*last_noise[i];
// Normalise the noise between 0->1 for 0->9 variances (0->3 stddevs).
- double norm_noise = last_noise[i] < 1e-10 ? 0 : std::min<double>(noise/(9.0*last_noise[i]), 1.0);
+ double norm_noise = last_noise[i] < 1e-10 ? 0 : std::fmin(noise/(9.0*last_noise[i]), 1.0);
// Calculate the smoothing 0.0->1.0 from the normalized noise.
double smoothing = 1.0 - pow(norm_noise, smoothing_scale_curve);
double RC = (min_smoothing + smoothing*(max_smoothing - min_smoothing));
// Calculate the dynamic alpha.
double alpha = dt/(dt + RC);
// Calculate the new output position.
- output[i] = last_output[i] = alpha*input[i] + (1.0-alpha)*last_output[i];
+ last_output[i] += alpha * (input_value - last_output[i]);
+ output[i] = last_output[i];
}
}
diff --git a/filter-ewma2/ftnoir_filter_ewma2.h b/filter-ewma2/ftnoir_filter_ewma2.h
index 8babc540..5698157d 100644
--- a/filter-ewma2/ftnoir_filter_ewma2.h
+++ b/filter-ewma2/ftnoir_filter_ewma2.h
@@ -13,30 +13,31 @@ struct settings : opts {
value<slider_value> kMinSmoothing, kMaxSmoothing, kSmoothingScaleCurve;
settings() :
opts("ewma-filter"),
- kMinSmoothing(b, "min-smoothing", slider_value(.02, .01, 1)),
- kMaxSmoothing(b, "max-smoothing", slider_value(.7, .01, 1)),
- kSmoothingScaleCurve(b, "smoothing-scale-curve", slider_value(.8, .1, 5))
+ kMinSmoothing(b, "min-smoothing", { .02, .01, 1 }),
+ kMaxSmoothing(b, "max-smoothing", { .7, .01, 1 }),
+ kSmoothingScaleCurve(b, "smoothing-scale-curve", { .8, .1, 5 })
{}
};
-
class ewma : public IFilter
{
public:
ewma();
void filter(const double *input, double *output) override;
void center() override { first_run = true; }
+ module_status initialize() override { return status_ok(); }
private:
// Deltas are smoothed over the last 1/60sec.
- const double delta_RC = 1./60;
+ static constexpr double delta_RC = 1./60;
// Noise is smoothed over the last 60sec.
- const double noise_RC = 60.0;
+ static constexpr double noise_RC_max = 60.0;
+ double noise_RC = 0.0;
double last_delta[6];
double last_noise[6];
double last_output[6];
Timer timer;
settings s;
- bool first_run;
+ bool first_run = true;
};
class dialog_ewma: public IFilterDialog
@@ -54,12 +55,12 @@ private:
private slots:
void doOK();
void doCancel();
- void update_labels(int);
};
class ewmaDll : public Metadata
{
-public:
- QString name() { return QString(QCoreApplication::translate("ewmaDll", "EWMA")); }
+ Q_OBJECT
+
+ QString name() { return tr("EWMA"); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
diff --git a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
index 5372767d..dc008c93 100644
--- a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
+++ b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
@@ -1,7 +1,10 @@
#include "ftnoir_filter_ewma2.h"
+
#include <cmath>
+
#include <QDebug>
#include <QString>
+
#include "api/plugin-api.hpp"
#include "ui_ftnoir_ewma_filtercontrols.h"
@@ -16,20 +19,20 @@ dialog_ewma::dialog_ewma()
tie_setting(s.kMinSmoothing, ui.minSmooth);
tie_setting(s.kSmoothingScaleCurve, ui.powCurve);
- connect(ui.powCurve, &QSlider::valueChanged, this, &dialog_ewma::update_labels);
- connect(ui.minSmooth, &QSlider::valueChanged, this, &dialog_ewma::update_labels);
- connect(ui.maxSmooth, &QSlider::valueChanged, this, &dialog_ewma::update_labels);
+ tie_setting(s.kSmoothingScaleCurve, ui.curve_label,
+ [](double x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2); });
+
+ tie_setting(s.kMinSmoothing, ui.min_label,
+ [](double x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);});
- using std::min;
- using std::max;
+ tie_setting(s.kMaxSmoothing, ui.max_label,
+ [](double x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);});
connect(ui.minSmooth, &QSlider::valueChanged, this,
- [&](int v) -> void { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); });
+ [&](int v) { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); });
connect(ui.maxSmooth, &QSlider::valueChanged, this,
- [&](int v) -> void { if (ui.minSmooth->value() > v) ui.minSmooth->setValue(v); });
-
- update_labels(0);
+ [&](int v) { if (ui.minSmooth->value() > v) ui.minSmooth->setValue(v); });
}
void dialog_ewma::doOK()
@@ -42,10 +45,3 @@ void dialog_ewma::doCancel()
{
close();
}
-
-void dialog_ewma::update_labels(int)
-{
- ui.curve_label->setText(QString::number(static_cast<slider_value>(s.kSmoothingScaleCurve).cur() * 100, 'f', 2) + "%");
- ui.min_label->setText(QString::number(static_cast<slider_value>(s.kMinSmoothing).cur() * 100, 'f', 2) + "%");
- ui.max_label->setText(QString::number(static_cast<slider_value>(s.kMaxSmoothing).cur() * 100, 'f', 2) + "%");
-}
diff --git a/filter-ewma2/lang/de_DE.ts b/filter-ewma2/lang/de_DE.ts
new file mode 100644
index 00000000..be6712e6
--- /dev/null
+++ b/filter-ewma2/lang/de_DE.ts
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name>UICdialog_ewma</name>
+ <message>
+ <source>EWMA filter settings</source>
+ <translation>EWMA-Filtereinstellungen</translation>
+ </message>
+ <message>
+ <source>Max</source>
+ <translation>Maximum</translation>
+ </message>
+ <message>
+ <source>Min</source>
+ <translation>Minimum</translation>
+ </message>
+ <message>
+ <source>Curve</source>
+ <translation>Kurve</translation>
+ </message>
+ <message>
+ <source>100%</source>
+ <translation>100%</translation>
+ </message>
+ <message>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Max:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to slow movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Pow:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the filters &apos;readiness&apos; to respond to speed changes;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value = &lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;faster&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Bitte einige Sekunden warten, bis der Filter warm gelaufen ist und nicht mehr zittert.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Minimum:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Definiert, wie der Filter auf schnelle Bewegungen reagiert;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Höherer Wert: langsameres Ansprechen;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Maximum:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Definiert, wie der Filter auf langsame Bewegungen reagiert;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Höherer Wert: langsameres Ansprechen;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Stärke:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Definiert die &apos;Bereitschaft&apos; des Filters, auf Geschwindigkeitsänderungen zu reagieren;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Höherer Wert = &lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;schnelleres&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; Ansprechen;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>ewmaDll</name>
+ <message>
+ <source>EWMA</source>
+ <translation>EWMA</translation>
+ </message>
+</context>
+</TS>
diff --git a/filter-ewma2/lang/nl_NL.ts b/filter-ewma2/lang/nl_NL.ts
index 3fd59155..8c718b7d 100644
--- a/filter-ewma2/lang/nl_NL.ts
+++ b/filter-ewma2/lang/nl_NL.ts
@@ -4,39 +4,31 @@
<context>
<name>UICdialog_ewma</name>
<message>
- <location filename="../ftnoir_ewma_filtercontrols.ui" line="+23"/>
<source>EWMA filter settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+37"/>
<source>Max</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+53"/>
<source>Min</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+47"/>
<source>Curve</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+44"/>
- <location line="+16"/>
- <location line="+16"/>
<source>100%</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter up to 60 seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
@@ -56,7 +48,6 @@ p, li { white-space: pre-wrap; }
<context>
<name>ewmaDll</name>
<message>
- <location filename="../ftnoir_filter_ewma2.h" line="+62"/>
<source>EWMA</source>
<translation type="unfinished"></translation>
</message>
diff --git a/filter-ewma2/lang/ru_RU.ts b/filter-ewma2/lang/ru_RU.ts
index 5953a243..14afb40e 100644
--- a/filter-ewma2/lang/ru_RU.ts
+++ b/filter-ewma2/lang/ru_RU.ts
@@ -4,39 +4,31 @@
<context>
<name>UICdialog_ewma</name>
<message>
- <location filename="../ftnoir_ewma_filtercontrols.ui" line="+23"/>
<source>EWMA filter settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+37"/>
<source>Max</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+53"/>
<source>Min</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+47"/>
<source>Curve</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+44"/>
- <location line="+16"/>
- <location line="+16"/>
<source>100%</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter up to 60 seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
@@ -56,7 +48,6 @@ p, li { white-space: pre-wrap; }
<context>
<name>ewmaDll</name>
<message>
- <location filename="../ftnoir_filter_ewma2.h" line="+62"/>
<source>EWMA</source>
<translation type="unfinished"></translation>
</message>
diff --git a/filter-ewma2/lang/stub.ts b/filter-ewma2/lang/stub.ts
index de5b39e6..fcce862e 100644
--- a/filter-ewma2/lang/stub.ts
+++ b/filter-ewma2/lang/stub.ts
@@ -4,39 +4,31 @@
<context>
<name>UICdialog_ewma</name>
<message>
- <location filename="../ftnoir_ewma_filtercontrols.ui" line="+23"/>
<source>EWMA filter settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+37"/>
<source>Max</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+53"/>
<source>Min</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+47"/>
<source>Curve</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+44"/>
- <location line="+16"/>
- <location line="+16"/>
<source>100%</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter up to 60 seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
@@ -56,7 +48,6 @@ p, li { white-space: pre-wrap; }
<context>
<name>ewmaDll</name>
<message>
- <location filename="../ftnoir_filter_ewma2.h" line="+62"/>
<source>EWMA</source>
<translation type="unfinished"></translation>
</message>
diff --git a/filter-ewma2/lang/zh_CN.ts b/filter-ewma2/lang/zh_CN.ts
new file mode 100644
index 00000000..b709f5c3
--- /dev/null
+++ b/filter-ewma2/lang/zh_CN.ts
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="zh_CN">
+<context>
+ <name>UICdialog_ewma</name>
+ <message>
+ <source>EWMA filter settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Max</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Min</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Curve</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>100%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;Give the filter a few seconds to warm up and stop shaking.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Max:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to slow movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Pow:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the filters &apos;readiness&apos; to respond to speed changes;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value = &lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;faster&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation type="unfinished">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Sans Serif&apos;; font-size:10pt; font-weight:600;&quot;&gt;给过滤器一点时间来完成预热与消除抖动. &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;定义滤波器对快速运动的响应方式; &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;数值越大, 响应越慢; &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Max:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;定义滤波器对慢速运动的响应方式; &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;数值越大, 响应越慢; &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Pow:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;定义滤波器&apos;readiness&apos; to respond to speed changes;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;更大数值 = &lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;更快&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; 响应;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>ewmaDll</name>
+ <message>
+ <source>EWMA</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>