diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-19 18:30:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-19 18:38:47 +0200 |
commit | 214a8083c3a4e794c0d88b939606a263dc045563 (patch) | |
tree | 1237e1ad7fb9bacc49df80d06e8d050c86e0e535 | |
parent | 7d95cb69ead5e427b900184021de73b65a58f982 (diff) |
ewma: fix filter lack of idempotence
Bug introduced by self in c4f6c12187ed423edc17501b0f6bda129d192bca
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index 69d18d9b..6bf2396a 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -115,7 +115,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, //NB: larger alpha = *less* lag (opposite to what you'd expect)
float largest_alpha=0.0f;
for (int i=0;i<6;i++) {
- largest_alpha=std::max<double>(largest_alpha, alpha[i]);
+ largest_alpha=std::min<double>(largest_alpha, alpha[i]);
}
// Calculate the new camera position.
|