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.
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.
Comments
sensorFusionModule.configure()
.setMode(SensorFusion.Mode.NDOF)
.setAccRange(SensorFusion.AccRange.AR_2G)
.setGyroRange(SensorFusion.GyroRange.GR_250DPS)
.commit();
sensorFusionModule.routeData()
.fromQuaternions().process(new Time(Time.OutputMode.ABSOLUTE, 20))
.stream(QUATERNIONSTREAMID)
.commit()
.onComplete(handleQuaternionStream);
To allow streaming at 50 Hz, but it doesn't seem to do what expected, the sampling rate is lower (around 19 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.