I’m trying to log Gyro 1 and Gyro 2 at a sampling rate of 8 kHz using the IMU Batch Sampler to measure vibration. However, when I open the log files in the ArduPilot Filter Review Tool, it shows that my primary gyro is only logging at 1.6 kHz—or sometimes as low as 1.3 kHz. I’ve already tried setting INS_GYRO_RATE to 4k and 8k, but the primary gyro still logs at the same lower rate. The second gyro does log at 4k or 8k, but I can’t review its data because it’s grayed out in the tool.
I think IMU1 (ADIS1647x) does not support anything above 2kHz sampling rate (at least that is my conclusion from looking into datasheet). But why it is lower that that - not sure. Perhaps some relation to ardupilot loop rate.
The logging rate at the bottom of the box is calculated from the logged data. In this case the logging rate is only a little lower than the sensor rate, and your not dropping log messages, so the problem is not with logging, its just the rate the sensor is running at.
The actual rate you get depends what the individual sensor is capable of, how much stuff there is on the bus, if the DMA is shared with other peripherals (and probably some other stuff). AP tries to converge to a consistent sample rate.
Thanks for the clarification. I was able to successfully perform batch logging and raw logging in my test.
I also tested removing the ADIS, as it wasn’t logging at the rate I was expecting and I was experiencing some instability in Loiter and PosHold modes. From this post — Introducing the Holybro Pixhawk 6X Pro — I saw that the logging rate for Gyro 1 is around 2 kHz.
Using only the IIM and ICM, GPS-based flight modes became significantly more stable — much closer to what I was expecting.
Can you explain why the ADIS is not logging at the expected rate? Is there anything I can change to fix this?
It seems that the slower logging rate of the ADIS may be contributing to instability in GPS modes. Could you please explain why that might be?