Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect formula in OneEuro.h #1

Open
edgar-bonet opened this issue Aug 1, 2021 · 0 comments
Open

Incorrect formula in OneEuro.h #1

edgar-bonet opened this issue Aug 1, 2021 · 0 comments

Comments

@edgar-bonet
Copy link

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 ← (xxfilt.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant