-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Make magneto take a constant amount of memory, regardless of the number of samples. #200
Conversation
Once #201 is merged, the pull_request check should succeed. |
@kitlith you still have to rebase onto |
It's MIT licensed, I'm not concerned.
No matter how many samples you feed to magneto, it now only needs a 10x10 state matrix. The difference in output given identical inputs should be (and has been tested to be) negligible.
414c526
to
c389c4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's code for the ICM20498 missing
The ICM20498 does not have any mode that currently uses magneto, and therefore is out of scope for this PR. If someone writes something for the ICM20498 that doesn't use the built-in DMP, that would be the time to introduce the use of magneto. |
Ah okay, makes sense ^^ |
Needs testing. |
This optimization has been in use in my BMI branch for almost 2 months without any issues. |
Closes #197
Third commit is the real meat of this change, it is probably easier to review commit by commit due to the movement of the math functions of another file in the first commit.
I have tested this idea and observed negligible or no change in the calibration matrix given the same input.
I haven't changed anything about how the sensors use magneto, other than causing a net reduction in memory usage. I leave it up to other people to experiment with increasing the number of samples now that we're no longer memory constrained.