So for the past week I have been lurking through the forums searching for people with the same problem and have found quite a few that have post here previously. I have tried to look at the input and check to see where I went wrong by the suggestions and yet still a bit confused.
When reading the magnetometer, from my understanding the number you will read from it will be between -4027 and 4028 with those being overflow conditions. I seem to be receiving huge numbers from the magnetometer (etc X MAX: 32512 MIN: -32512). But from the datasheet I wouldn't think this would be a problem seeing as it is stated the magnetometer data is 16-bits.
I thought ok I will set the gain down on the compass and got readings like 2034 and -2141 which I thought maybe that would be better. The problem I have is still present. Yaw wants to drift to N which i turn off drift detection my Yaw is extremely solid. Pitch and Roll seem to always be very solid except when Roll reaches 90 Pitch is shoot up to 90 also.
If anyone has any suggestions please let me know. The code I have is the basic Pololu MinIMU code for the arduino.
I found out that I had the High byte and Low byte swapped on the compass. The high byte comes first as opposed to the accelerometer which the low bytes is first. I re-calibrated the compass and got values that are looking like normal. My problem is still when I move the sensor around Yaw it will always move back to North.
So for the past week I have been lurking through the forums searching for people with the same problem and have found quite a few that have post here previously. I have tried to look at the input and check to see where I went wrong by the suggestions and yet still a bit confused.
When reading the magnetometer, from my understanding the number you will read from it will be between -4027 and 4028 with those being overflow conditions. I seem to be receiving huge numbers from the magnetometer (etc X MAX: 32512 MIN: -32512). But from the datasheet I wouldn't think this would be a problem seeing as it is stated the magnetometer data is 16-bits.
I thought ok I will set the gain down on the compass and got readings like 2034 and -2141 which I thought maybe that would be better. The problem I have is still present. Yaw wants to drift to N which i turn off drift detection my Yaw is extremely solid. Pitch and Roll seem to always be very solid except when Roll reaches 90 Pitch is shoot up to 90 also.
If anyone has any suggestions please let me know. The code I have is the basic Pololu MinIMU code for the arduino.
I found out that I had the High byte and Low byte swapped on the compass. The high byte comes first as opposed to the accelerometer which the low bytes is first. I re-calibrated the compass and got values that are looking like normal. My problem is still when I move the sensor around Yaw it will always move back to North.