The real sample rate of the RocketLogger does not exactly match the configured the ADC data rate. The ADC data rates are exact for a 2.048 MHz clock, the closest the BeagleBone can generate using PWM is 2.041 MHz (49 PWM cycles period at 100 MHz).
When using "relative" timestamps (derived considering the sample rate and sample indices only!) one may use the following scaling factor for the sample rate for more precise timestamps:
SAMPLE_RATE_SCALING = (100e6 / 49) / 2.048e6
Note:
If you rely on precise timestamps, you should consider using the timestamps recorded during the measurements. See the documentation of the RocketLogger data format.
The real sample rate of the RocketLogger does not exactly match the configured the ADC data rate. The ADC data rates are exact for a 2.048 MHz clock, the closest the BeagleBone can generate using PWM is 2.041 MHz (49 PWM cycles period at 100 MHz).
When using "relative" timestamps (derived considering the sample rate and sample indices only!) one may use the following scaling factor for the sample rate for more precise timestamps:
Note: If you rely on precise timestamps, you should consider using the timestamps recorded during the measurements. See the documentation of the RocketLogger data format.
Relates to: https://gitlab.ethz.ch/tec/public/rocketlogger/-/issues/130