-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Calibration function is wrong #54
Comments
@MArimont3
Can you explain or show why you think it is wrong? The idea of the calibration is to have the sensor in a stable, horizontal, non moving position. The underlying assumption is that this average error at the "no movement" level is the same as when the sensor is undergoing movements and accelerations in XYZ planes. I am no physicist, and I know the correction needed will probably be acceleration dependent and the three axis might even affect each other. However investigating a more elaborated (2nd or more order) calibration is outside my scope.
I will have a look in that one asap. |
Error confirmed, I will update this example right away (will not publish a new release for it) |
@MArimont3 |
The issue with the calibration function is that you are modifying the errors while you are performing the calibration. That breaks the averaging, because you are only measuring the "full" error on the first iteration. |
OK, that gives some information where to look, I'll dive into it asap. Thanks! |
Aha, stupid me, I see the problem, will create a develop branch for a fix. |
Created develop branch + PR - #55 |
Hi, I think your calibration function is very wrong.
You initialize the calibration values to zero. Ok.
But then in a loop, you
So you are getting some random values out...
Also: the example GY521_performance_calibrate.ino has a method test with an argument, but this is never used. It is hardcoded the test should run 100 times.
The text was updated successfully, but these errors were encountered: