Inconsistent data streaming

Hi all,

I am getting very inconsistent data streams, only 2 out of 10 streamed data is desirable.
Is it due to connection problem or because acclero and gyro is independent. In most of the cases i get lots of accle data but no gyro.
Here is the code, please guide:
https://gist.github.com/rajkumarmishra/5a60ff92ce91e4cc820eeecd394eda2e

Comments

  • edited June 2016
    1. What Android device and OS are you using?
    2. If you reduce the frequency, do you get more consistent results?
    I don't have any issue with a 50Hz stream (25Hz each on acc/gyro) on my Nexus 6 with Android M.
  • edited June 2016
    hi Eric,
    I am using Redmi 2 prime android KitKat, also checked with Sony Z5 Android L, the data is usually consistent, it is inconsistent may be 3-4 out of 10 . So there is reliability issue can it be made more reliable.
    other questions:
    1. while Accel and gyro stream simultaneously, does streaming happens parallel in the system as time stamp is not same 

    2. lame question, what is the maximum ODR for gyro and accel ? as data points are almost(73 -76 per second) at 50,100,200,400,1600 Hz (each gyro and accle). 

    3. I want to stream data at higher rate say more than 100 data points for each sensor, is it possible using single Metawear CPRO 

    Thanks,





  • edited June 2016



  • I'm having a similar issue to rajmishra.  On an LG-D850 (LG G3), streaming accel and gyro from a Metawear C sensor at 100Hz each works fine.  However, on a Samsung SM-T280 (Galaxy Tab A), I have to drop to 25hz to even get gyroscope data at all, and even then I get gyro values at a much lower rate than accelerometer values.

    Changing the minimum connection interval on the board may be a good idea rajmishra (https://mbientlab.com/androiddocs/latest/settings.html#connection-parameters).  

    Unfortunately, that fix did not work for me.  Is there any way to have the Android device decrease it's own connection interval or increase it's GATT connection priority to the sensor?
  • There is no API to change BLE connection parameters on the Android side.
  • edited June 2016
    Thanks Eric/emvasey,

    Now i am able to get decent and consistent data @100Hz, honestly did not do any major changes in the cod e., though i don't mind unless i'm getting data as desirable.

    Eric, is it possible to get more data per second or at higher rate. even @100Hz data points are less than 100/sec.
This discussion has been closed.