-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Bug in Madgwick filter _compute_all() #100
Comments
Hi @adscregg thanks for bringing this up. I've seen no difference with the changes. I think it is mainly because Python performs the
However, I've decided to refactor the definition of the new quaternion as you suggested to keep it in line with the algorithm explained in the original article. This will help us to understand that The changes are in the commit e3c3b24 If there are further questions, please let me know. Cheers! |
Using the logic below to create a quaternion array in the _compute_all method overwrites Q[t-1] with the value that should be at Q[t].
This is caused by the updateMARG (and updateIMU) methods doing inplace updates:
where q is the priori input into the method. However because of the inplace updates q then becomes the updated input and hence the value Q[t-1] is updated to be equal to Q[t] and as the value is returned at the end of the method as well so
Q[t] == Q[t-1]
for the final value of t i.e. the last two rows of Q will always be exactly equal which is not correct.Suggest removing the inplace operations in favour of something like:
The text was updated successfully, but these errors were encountered: