diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-18 09:02:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-18 09:02:23 +0200 |
commit | de79ef90a6a16854709ecf7bfe8b713c4b5d382a (patch) | |
tree | f0f6e5bc406d74b8894f36c57f57e27b81727b72 | |
parent | bcf12504559ff6acce3d6ea3020fbe8430ac64cc (diff) |
accela: also don't poison ewma state with nans
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index 2fb00739..9bac5d58 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -105,7 +105,7 @@ void FTNoIR_Filter::filter(const double* input, double *output) { Map& m = i >= 3 ? rot : trans; - smoothed_input[i] = smoothed_input[i] * (1.-alpha) + input[i] * alpha; + smoothed_input[i] = smoothed_input[i] * (1.-alpha) + elide_nan(input[i], smoothed_input[i]) * alpha; const double in = smoothed_input[i]; |