summaryrefslogtreecommitdiffhomepage
path: root/filter-kalman
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:15:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:48:11 +0100
commitb89699c7551f768bf4ff47820543f8c7b8c794af (patch)
treec3a21ec23a40250ec54b97fe17b9035a932cfaf8 /filter-kalman
parent068e0c7d432ede0a388fe1478b5146fcf1809315 (diff)
modules: make names unique
Diffstat (limited to 'filter-kalman')
-rw-r--r--filter-kalman/ftnoir_kalman_filtercontrols.ui4
-rw-r--r--filter-kalman/kalman.cpp22
-rw-r--r--filter-kalman/kalman.h14
3 files changed, 20 insertions, 20 deletions
diff --git a/filter-kalman/ftnoir_kalman_filtercontrols.ui b/filter-kalman/ftnoir_kalman_filtercontrols.ui
index 6ec18ba8..f17984e3 100644
--- a/filter-kalman/ftnoir_kalman_filtercontrols.ui
+++ b/filter-kalman/ftnoir_kalman_filtercontrols.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>KalmanUICFilterControls</class>
- <widget class="QWidget" name="KalmanUICFilterControls">
+ <class>KalmanUICdialog_kalman</class>
+ <widget class="QWidget" name="KalmanUICdialog_kalman">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp
index 6ed5ca91..0fc0c4ba 100644
--- a/filter-kalman/kalman.cpp
+++ b/filter-kalman/kalman.cpp
@@ -104,7 +104,7 @@ PoseVector DeadzoneFilter::filter(const PoseVector &input)
}
-void FTNoIR_Filter::fill_transition_matrix(double dt)
+void kalman::fill_transition_matrix(double dt)
{
for (int i = 0; i < 6; ++i)
{
@@ -112,7 +112,7 @@ void FTNoIR_Filter::fill_transition_matrix(double dt)
}
}
-void FTNoIR_Filter::fill_process_noise_cov_matrix(StateMatrix &target, double dt) const
+void kalman::fill_process_noise_cov_matrix(StateMatrix &target, double dt) const
{
// This model is like movement at fixed velocity plus superimposed
// brownian motion. Unlike standard models for tracking of objects
@@ -141,7 +141,7 @@ void FTNoIR_Filter::fill_process_noise_cov_matrix(StateMatrix &target, double dt
}
-PoseVector FTNoIR_Filter::do_kalman_filter(const PoseVector &input, double dt, bool new_input)
+PoseVector kalman::do_kalman_filter(const PoseVector &input, double dt, bool new_input)
{
if (new_input)
{
@@ -157,13 +157,13 @@ PoseVector FTNoIR_Filter::do_kalman_filter(const PoseVector &input, double dt, b
-FTNoIR_Filter::FTNoIR_Filter() {
+kalman::kalman() {
reset();
}
// The original code was written by Donovan Baarda <abo@minkirri.apana.org.au>
// https://sourceforge.net/p/facetracknoir/discussion/1150909/thread/418615e1/?limit=25#af75/084b
-void FTNoIR_Filter::reset()
+void kalman::reset()
{
kf.init();
kf_adaptive_process_noise_cov.init();
@@ -203,7 +203,7 @@ void FTNoIR_Filter::reset()
}
-void FTNoIR_Filter::filter(const double* input_, double *output_)
+void kalman::filter(const double* input_, double *output_)
{
// almost non-existent cost, so might as well ...
Eigen::Map<const PoseVector> input(input_, PoseVector::RowsAtCompileTime, 1);
@@ -257,7 +257,7 @@ void FTNoIR_Filter::filter(const double* input_, double *output_)
-FilterControls::FilterControls()
+dialog_kalman::dialog_kalman()
: filter(nullptr)
{
ui.setupUi(this);
@@ -274,7 +274,7 @@ FilterControls::FilterControls()
}
-void FilterControls::updateLabels(const slider_value&)
+void dialog_kalman::updateLabels(const slider_value&)
{
// M$ hates unicode! (M$ autoconverts source code of one kind of utf-8 format,
// the one without BOM, to another kind that QT does not like)
@@ -288,16 +288,16 @@ void FilterControls::updateLabels(const slider_value&)
}
-void FilterControls::doOK() {
+void dialog_kalman::doOK() {
s.b->save();
close();
}
-void FilterControls::doCancel()
+void dialog_kalman::doCancel()
{
close();
}
-OPENTRACK_DECLARE_FILTER(FTNoIR_Filter, FilterControls, FTNoIR_FilterDll)
+OPENTRACK_DECLARE_FILTER(kalman, dialog_kalman, kalmanDll)
diff --git a/filter-kalman/kalman.h b/filter-kalman/kalman.h
index d60634c4..fd71d99f 100644
--- a/filter-kalman/kalman.h
+++ b/filter-kalman/kalman.h
@@ -131,13 +131,13 @@ struct settings : opts {
};
-class FTNoIR_Filter : public IFilter
+class kalman : public IFilter
{
PoseVector do_kalman_filter(const PoseVector &input, double dt, bool new_input);
void fill_transition_matrix(double dt);
void fill_process_noise_cov_matrix(StateMatrix &target, double dt) const;
public:
- FTNoIR_Filter();
+ kalman();
void reset();
void filter(const double *input, double *output);
PoseVector last_input;
@@ -153,23 +153,23 @@ public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
-class FTNoIR_FilterDll : public Metadata
+class kalmanDll : public Metadata
{
public:
QString name() { return QString("Kalman"); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
-class FilterControls: public IFilterDialog
+class dialog_kalman: public IFilterDialog
{
Q_OBJECT
public:
- FilterControls();
- Ui::KalmanUICFilterControls ui;
+ dialog_kalman();
+ Ui::KalmanUICdialog_kalman ui;
void register_filter(IFilter*) override {}
void unregister_filter() override {}
settings s;
- FTNoIR_Filter *filter;
+ kalman *filter;
public slots:
void doOK();
void doCancel();