Razor-AHRS / razor-9dof-ahrs

AHRS Firmware for the SparkFun 9DOF Razor IMU and SparkFun 9DOF Sensor Stick
Other
451 stars 264 forks source link

Data rate for ITG Gyro #30

Open askannerdarkly opened 9 years ago

askannerdarkly commented 9 years ago

Thank you for your awesome library! I am using it for an experimental model for my PhD. I need to reduce the data rates because I run this huge loop that takes about 50 ms (20 Hz) and I have some issues with I2C hanging. I noticed that for the ITG-3200 Gyro you set DLPF_CFG=3, which sets the internal clock to 1 kHz. Then you set the clock divider to 10. From the example they give in the schematic, it seems that you set the sample rate to 1000/(10+1)= 91 Hz. Am I missing something here?

max246 commented 9 years ago

The sensor can be setup with different rate, check the datasheet what your model can support. Also, you can introduce a clever output that doesnt return too much information and reduce to 20hz