sampling rate Metabase Motion R not consistent.

Hi

I have tried to run the accelerometer sensor data acquisition with +-4 , 400 HZ its not consist sample rate between two records
Time x y z. delta (Time difference )
1.60553E+12 -0.18859863 0.16674805 -0.954834 1
1.60553E+12 -0.19165039 0.1685791 -0.96203613 3
1.60553E+12 -0.19091797 0.16564941 -0.9625244 3
1.60553E+12 -0.1928711 0.16369629 -0.9609375 3
1.60553E+12 -0.1940918 0.16687012 -0.9592285 1
1.60553E+12 -0.19335938 0.16442871 -0.9605713 3
1.60553E+12 -0.19616699 0.16760254 -0.9593506 3
1.60553E+12 -0.19128418 0.16699219 -0.95996094 2
1.60553E+12 -0.19165039 0.16320801 -0.9602051 3
1.60553E+12 -0.19274902 0.16540527 -0.96313477 3
1.60553E+12 -0.18981934 0.16052246 -0.9604492 2
1.60553E+12 -0.19189453 0.16687012 -0.96118164 2
1.60553E+12 -0.18798828 0.16967773 -0.9595947 3
1.60553E+12 -0.19348145 0.17004395 -0.9602051 3
1.60553E+12 -0.1920166 0.16955566 -0.9559326 1
1.60553E+12 -0.18859863 0.16467285 -0.9625244 3
1.60553E+12 -0.18823242 0.16882324 -0.96435547 3
1.60553E+12 -0.19274902 0.16809082 -0.95996094 2
1.60553E+12 -0.19299316 0.16125488 -0.9626465 3
1.60553E+12 -0.19494629 0.1665039 -0.9622803 2
1.60553E+12 -0.19140625 0.16967773 -0.954834 3
1.60553E+12 -0.19372559 0.1685791 -0.9604492 2
1.60553E+12 -0.19641113 0.16638184 -0.96325684 3
1.60553E+12 -0.19299316 0.16601562 -0.9572754 3

How can achieve the consistent accelerometer sensor data acquisition I have tested with Metabase IOS app / Test app same results observed .

Can you please let me know what is best configuration to achieve best sampling rate

Appreciated your response Thanks

Comments

  •  auto signal = dynamic_cast<MblMwDataSignal*>(it->second);
        bool handled= false;
        int64_t epoch = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
    
        MblMwDataProcessor* processor = dynamic_cast<MblMwDataProcessor*>(signal);
    
    
    
    int64_t now = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
        for(uint8_t i= 2; i < len; i+= CARTESIAN_FLOAT_SIZE) {
            MblMwData* data = data_response_converters.at(signal->interpreter)(false, signal, response + i, len - i);
            data->epoch= now;
    

    As I learned from metawearboard.cpp it seems epoch is based on system_clock and time_since_epoch() count.
    how to get this value consistent between the two samples. below is current settings kept on the mobile app side

            mbl_mw_acc_bosch_set_range(device.board, MBL_MW_ACC_BOSCH_RANGE_4G)
                mbl_mw_acc_set_odr(device.board, Float(400))
                mbl_mw_acc_bosch_write_acceleration_config(device.board)
    

    Please let me know what are excepted configurations to get the epoch time.

    Is the epoch is original time of the sensor collected the accelerometer data?

Sign In or Register to comment.