What does SampleRate.MS16, MS32, MS128 stand for when associated with sensor listeners?

345 views Asked by At

I am developing an application which makes use of the Microsoft Band sensors. For most of the sensors, whenever registering the listener, a SampleRate must be associated. The possible values of this SampleRate are:

  • MS16
  • MS32
  • MS128

My first feeling is that they represent the time it takes for one sample to be processed, more precisely the frequency with which they are processed, but I can't find this information anywhere.

I appreciate any feedback on this matter.

1

There are 1 answers

1
Mirel Vlad On BEST ANSWER

It seems my intuition was pretty close to the truth. I conducted some experiments and indeed the SampleRate refers to the frequency with which measurements are done. The unit of time is in seconds.

Thus, for a SampleRate = x, a sensor value is retrieved every 1 / x seconds.

This is a simple experiment to prove it. For SampleRate.MS32 the following values were shown in the logat:

[...]

06-17 11:28:34.748 30673-30744/com.salve E/ACCELEROMETER﹕ 0.9975586

06-17 11:28:34.777 30673-30744/com.salve E/ACCELEROMETER﹕ 0.99853516

06-17 11:28:34.810 30673-30744/com.salve E/ACCELEROMETER﹕ 0.9970703

06-17 11:28:34.842 30673-30744/com.salve E/ACCELEROMETER﹕ 0.9987793

06-17 11:28:34.872 30673-30744/com.salve E/ACCELEROMETER﹕ 0.99658203

06-17 11:28:34.906 30673-30744/com.salve E/ACCELEROMETER﹕ 0.9987793

[...]

When comparing the values in bold, a difference close to 32 between adjacent values is found. Maybe it is not quite 32 because of additional lag cause by the Bluetooth transmission or other intermediary processes that occur.