I found out that when using high sample rates, movesense sends multiple values in one package. Movesense - Accelerometer Sampling Rate change fails
Is it possible to get accurate timestamps for all received values when using high sample rate (e.g. 104Hz)?
The reason movesense sensor sends more than one sample per timestamp is to save bandwidth when communicating over BLE and to save memory when same packets are stored in the internal data memory (EEPROM). Since the packets come at frequent intervals and the sample amount does not change, you can easily calculate the intermediate timestamps for individual samples.
The /Meas/Acc spec (acc.yaml) states:
Timestamp: description: Local timestamp of first measurement.
so the 1st sample (i==0) timestamp is given. If the sample rate is 104 Hz the difference in time between samples is 1000/104 ms => ~ 9.6ms. Therefore the timestamp of the later samples [i=1..n] in the array can be calculated by:
timestamp_i = timestamp_0 + i * 9.6ms