Incorrect formula in OneEuro.h
edgar-bonet opened this issue · 0 comments
edgar-bonet commented
A comment at the top of OneEuro.h provides this link to a web page about the 1€ Filter by one of its authors. In that page, line 5 of Algorithm 1 shows that dx is to be computed as per the formula:
dx ← (x − xfilt.hatxprev()) * rate
The code, on the other hand, does (line 60):
dx = (x - xfilt_.xprev) * freq;
According to the provided reference, it should be xfilt_.hatxprev
rather than xfilt_.xprev
. Which incidentally implies that the xprev
member of low_pass_filter
is not needed.