I am building a system with multiple sensors and I want to sample the different sensors at different rates. For the sake of an example, I am using two MAX30102EFD-T sensors. One of the sensors I want to run at 50Hz and the other I want to sample at 1000 Hz. I have the ability to configure this sampling rate (samples per second) on the sensor and when each sensor has a new sample (supposedly at these frequencies), in the interrupt I can record this sensor value (and optionally record a timestamp like the number of milliseconds since boot.
As an example:
TIMESTAMP SENSOR VALUE
0 1 1.2
0 2 0.1
1 1 1.3
2 1 1.4
3 1 1.5
...
The issue is that storing timestamps along with the time series from both sensors can add significantly to the output file size. If the sampling rate of these sensors is reliable enough, I could just record the initial timestamp and the sampling rate and assume uniform sampling, but I'm hesitant to trust these types of sensors to have that uniform and accurate of a sampling rate. Is that distrust warranted in general?
I'm curious if anyone has any experience with such a thing and was interested to see if there was a robust approach short of storing timestamps for each sensor alongside the data.