unsynchronized data from accelerometer and gyrometer


I have modified sample app code to get accelero and gyro data together at 100hz each but data received is not in sync. As given in one of the discussion, we should receive data in chunks of 3 -3 ( 3 for gyro and 3 for accelero) but i am receiving 1 value for each. Some of the gyro data is skipped as well for example i received 4 values of accelero adn then one for gyro.

I have added a  java class in app, 
and the data i m getting from the app is this file1 and file2


  • Thanks Eric for the solution.
    I am getting the data in the packet of 3 (3 for gyro and 3 for accelero) after using the method packedAcceleration and same for gyro (packedAngularVelocity) . 
    I have encountered new issues after this change, now for first capture I get first packet with 3 entries for accelero and second packet with 3 entries for gyro. And on second attempt (without killing app) I get two packets for accelero and 2 for gyro which goes on increasing on each successive attempt. Just to keep you informed that I am starting both accelero andgyro in same class https://www.dropbox.com/s/hywaq011rlkhcv5/batting%20analysis.txt?dl=0

    My requirement is to get both accelerometer data and gyro-meter data in synchronized manner like we get in metabase app.
    Is metabase source code available which I can use for my app development.
  • edited May 2017
    Can you provide some CSV files that demonstrate this issue?  How are you using the code from your app?

    Also, the file you linked does not have the recent updates so I can't tell if you everything was implemented correctly.  Did you follow both steps outlined in the linked Android documentation?

    Please contact us directly for access to MetaBase source code.
  • Hi Eric,
    I have also implemented the the 2nd step outlined in the linked java documentation  in my ScannerActivity here is the part of code.
    Here is the output I am getting on 1st attempt  and on 2nd attempt. These are logs from Android Studio and it is the same data I am getting in .csv file
  • edited May 2017
    Looks like you are adding the same route multiple times.  Either add the route only once, or remove it every time you are done sampling.
This discussion has been closed.