Hello,
I am trying to increase the data rate of the Razor IMU M0.
I retrieve the pitch angle only at a frequency of 150 Hz on the serial hardware port.
I removed some unuseful code (for me) to optimize the speed ( computation of roll and yaw, parsing of serial input data, logging on the SD card).
The problem is that sometime, the returned pitch angle is corrupted.
I normally keep the IMU with a pitch angle varying between [-10 ; 10] degrees. Most of the measurements are correct in this range. However, every few seconds, i get erroneous pitch values, for instance such as 40° or 160°.
I modified only the data rate at 150 Hz:
#define DMP_SAMPLE_RATE 150//100 // Logging/DMP sample rate(4-200 Hz)
#define IMU_COMPASS_SAMPLE_RATE 100 // Compass sample rate (4-100 Hz)
#define IMU_AG_SAMPLE_RATE 150//100 // Accel/gyro sample rate Must be between 4Hz and 1kHz
and kept the factory parameters such as the Accel/Gyro LPF corner frequency and full scale range:
#define IMU_GYRO_FSR 2000 // Gyro full-scale range (250, 500, 1000, or 2000)
#define IMU_ACCEL_FSR 2 // Accel full-scale range (2, 4, 8, or 16)
#define IMU_AG_LPF 5 // Accel/Gyro LPF corner frequency (5, 10, 20, 42, 98, or 188 Hz)
When the IMU runs at 100 Hz, i do not observe the erroneous pitch angle values.
Do you have an idea why the IMU sometime returns erroneous values?
How could i correct this?
Kind regards,
Taiga