Sensor Fusion Sampling Rate
How can I set the sampling rate of Sensor Fusion using API 2.8.6?
Sampling rate is fixed depending on the sensor fusion operation mode. You can use a time processor.to reduce the data rate at the firmware level.
we tried with :
.fromQuaternions().process(new Time(Time.OutputMode.ABSOLUTE, 20))
To allow streaming at 50 Hz, but it doesn't seem to do what expected, the sampling rate is lower (around 19 Hz)
In any case, we are unable to have a reliable sampling rate also at 100 Hz. We tried with different Apps and with none of them the streaming rate reaches 100 Hz.
If you look to the files you obtain with MetaWear App (both API 3 and API 2.8 versions), it seems that the Android device is receiving a packet every 0.01 s but in reality this is an artificial time attached by the application and the number of packets received in one second is far lower than 100, around 30-40.
app for streaming data. The sample app simply provides an example of what can be done whereas MetaHub is built for streaming.
To steam sensor fusion at 100Hz, you'll need to modify the max connection interval as described in the documentation:
Use a smaller period like 15ms for the limit parameter. Sensor fusion has to combine data from 3 sensors so you will want to allocate some extra wiggle room for the period.