-
-
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
calibrate call offsets internal integration #56
Comments
Thanks for reporting the issue. There is a drift in the pitch roll yaw math too, and it might be related. (See issue #47). I need to find a large timeslot to dive into the datasheet and the math. |
There is a good chance that your suggestion is right! |
Printing the _gax _gay _gaz in the begin() function shows the UNO compiler sets them to zero. |
Created develop branch with the improved initialization. to be continued |
idea is to split |
Split off readRaw() from read() as private function. If you have time, can you verify if the develop branch works better than the 0.6.0 release? Thanks |
Need to think about this, makes sense as it accumulated its value pre-calibration. |
I tested the develop branch, but unfortunately something in there is completely broken. On
Also the values are moving at very high rates, something like 250° per second even though the board is not moving at all. |
Ok, thanks for testing, |
I did some digging, the reason for the issue now is:
alternatively, you can change the order in |
Hi,
I've tested the
GY521_pitch_roll_yaw
example and noticed a 30° offset on the roll axis right from the start. Playing around I also noticed that increasing the calibratetimes
argument, just makes it worse.There is an integration with class member variables going on in
read
, and sincecalibrate
calls it, this integration is offset by a constant factor oftimes
.I think at the end of
calibrate
the variables_gax
,_gay
and_gaz
should be reset to zero. And also they should be set to zero in the constructor to begin with. I only skimmed through the code, so there is a good chance that this suggestion could be wrong.Maik
The text was updated successfully, but these errors were encountered: