|
Re: ADXRS150 gyro yaw rate sensor
the sensor is not perfect, and you will never get it back to zero exactly
in fact, how are you turing the sensor so that you THINK you have turned it physically back to zero? you would need laboratory equipment to hold it perfectly flat as you turned it, and to realign it precisely with the starting point.
another factor is how close you are coming to the limit of its range when you turn it? if you do not turn it smoothly you might be hitting its limit, in which case your accumulated 'heading' will be off.
Take a look at how many counts per degree of rotation your heading variable corresponds to - if you are able to keep track of your heading within +/- a few degrees (not counts, degrees of rotation) you are doing good.
another thing to consider, if you have printF statements in your code it will run slower than if you dont - so be mindfull of that if you calibrate counts per degree, and then take the printF statements out - the interval between each read and accumulate is part of the integration and must be accounted for.
|