Quote:
|
Originally Posted by Kevin Watson
Sorry, I haven't been around much. The hillside directly behind my house collapsed last Sunday and I've been dealing with the mess.
Anyway, the two variables are GYRO_RATE_SCALE_FACTOR and GYRO_ANGLE_SCALE_FACTOR. GYRO_RATE_SCALE_FACTOR should be set to a value equal to the gyros sensitivity in units of angular rate per volt divided by the ADCs bits per volt. Set GYRO_ANGLE_SCALE_FACTOR to GYRO_RATE_SCALE_FACTOR divided by the update rate, which is 50Hz.
So, for example, to use the Analog Devices' ADXRS150 evaluation board, which has a sensitivity of 12.5mV/degree/sec, take the inverse of that sensitivity (80 degrees/sec/volt) and divide by the number of ADC bits per volt (1024/5), which equals (80 x 5)/1024 = 400/1024 = 100/256. The GYRO_ANGLE_SCALE_FACTOR is then just (100/256)/50 = 2/256 = 1/128.
In the coming days I'll be working on cleaning up not only my house, but the code too <grin>.
-Kevin
|
Thanks a lot Kevin!
Sorry to hear about your home
My team didn't receive the Kit yet but we decided now that we're going to use a testing plataform and last year's kit so that we can start our programming tests.
And since we programers were just helping out with other stuff we decided to do a very simple GUI for your code, We'll be finishing it today and I'll post here.