Millisecond sync

Hello,

I bought a Metamotion R sensor and i would like to know if it is possible to get quaternion and accelerometer data
at the same millisecond like this:
 < millisecond , quaternion , accelerometer >

I know that the frequency will be reduced beacuse of BLE but can at least sync my data as i said?

Comments

  • No, the data will come as two separate samples. You can post process the data in your app to match whatever format your need.
  • Thank you Eric for your reply,

    So i started to work the post process but i can't figure out a solution. Here is the problem: 
    I am streaming data from seonsor fusion bosch in particural quaternion , euler angles , linear acceleration. Here 
    is an output (sorted) with timestamp in milliseconds and  the type:

    1507811131770 acc
    1507811131771 euler
    1507811131807 euler
    1507811131808 quat
    1507811131808 acc
    1507811131809 quat
    1507811131809 euler
    1507811131810 acc
    1507811131811 quat
    1507811131811 euler
    1507811131856 euler
    1507811131857 quat
    1507811131857 euler
    1507811131857 acc
    1507811131858 quat
    1507811131859 euler
    1507811131859 acc
    1507811131860 quat
    1507811131905 quat
    1507811131905 euler
    1507811131906 euler
    1507811131906 acc
    1507811131907 quat
    1507811131907 acc
    1507811131908 euler
    1507811131909 quat
    1507811131954 quat
    1507811131954 euler
    1507811131955 acc
    1507811131956 euler
    1507811131957 quat
    1507811131958 euler
    1507811131958 acc
    1507811131959 quat
    1507811132002 euler
    1507811132003 quat
    1507811132004 acc
    1507811132010 quat
    1507811132010 euler
    1507811132011 acc
    1507811132012 quat
    1507811132012 euler
    1507811132051 euler
    1507811132052 quat
    1507811132053 euler
    1507811132053 acc
    1507811132054 quat
    1507811132054 acc

    You can see that the sensor is not giving accurate data. I expected to find a pattern in the data so i can match the format
    < millisecond , quaternion , euler , accelerometer >

    Do you have any any solution for this problem?
  • edited October 2017
    Post the metawear code you are calling. Also, what android os and device are you using?
  • android device: Xiaomi Redmi 3  (5.1.1 lollipop)
    Metamotion R

    The code i m using :
    sensorFusion.quaternion().addRouteAsync(new RouteBuilder() {
    @Override
    public void configure(RouteComponent source) {
    source.stream(new Subscriber() {
    @Override
    public void apply(Data data, Object... env) {
    notified(data, "quaternion"); //callback
    }
    });
    }

    }).continueWith(new Continuation<Route, Void>() {
    @Override
    public Void then(Task<Route> task) throws Exception {
    return null;
    }
    });

    sensorFusion.eulerAngles().addRouteAsync(new RouteBuilder() {
    @Override
    public void configure(RouteComponent source) {
    source.stream(new Subscriber() {
    @Override
    public void apply(Data data, Object... env) {
    notified(data, "euler");
    }
    });
    }
    }).continueWith(new Continuation<Route, Void>() {
    @Override
    public Void then(Task<Route> task) throws Exception {
    return null;
    }
    });

    sensorFusion.linearAcceleration().addRouteAsync(new RouteBuilder() {
    @Override
    public void configure(RouteComponent source) {
    source.stream(new Subscriber() {
    @Override
    public void apply(Data data, Object... env) {
    notified(data, "linear");
    }
    });
    }
    }).continueWith(new Continuation<Route, Void>() {
    @Override
    public Void then(Task<Route> task) throws Exception {
    sensorFusion.quaternion().start();
    sensorFusion.eulerAngles().start();
    sensorFusion.linearAcceleration().start();
    sensorFusion.start();
    return null;
    }
    });

    So the output with this code:

    1508417512834 acc
    1508417512835 quat
    1508417512835 euler
    1508417512836 euler
    1508417512836 acc
    1508417512837 quat
    1508417512838 quat
    1508417512838 euler
    1508417512882 euler
    1508417512883 quat
    1508417512883 acc
    1508417512884 euler
    1508417512885 quat
    1508417512885 acc
    1508417512886 euler
    1508417512887 euler
    ..


  • edited October 2017
    You can't stream that many sensor fusion outputs simultaneously, assuming you are using NDoF mode.   What is your use case that requires so many fused outputs?

    Even for a single sensor fusion output, make sure your BLE connection is properly configured for high frequency streaming, see the second paragraph of this section:
  • edited October 2017
    Here is a similar project that we are working on :

    Its a classification problem so we need at least euler and linear accelaration. Here you can see a sample from the microsoft project:

    You can see that for each time fraction they have quaternion, acceleration etc. ( for each sensor )
    I know that they tested the project with adafruit and xsens sensor and they didn't have any problem.
    Is it possible to have something similar with Metamotion R?

    Sorry if my question is dumb but i m not an expert in hardware
  • Yes you can however you cannot stream that much data over a BLE connection.  Either log the data (bounded by the amount of flash memory) or limit the output data rate such that the MetaMotion board is only sending data at a max throughput of 100Hz.
This discussion has been closed.