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
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
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?
Epoch time is the time at which the computer gets the sensor data. So that's why you see some minor changes.
The sensor is sampling correctly so the deltas are correct but the epochs granularity won't be because there are minor delays from the BLE and side processing by the time the "computer" gets the data.
This is just real life...real data is not perfect. That's why we invented post processing.
Hi Laura
What is the sampling frequency? I understand that each “delta t” is not consistent (0, 1, 2, 3) but the overall frequency seems to be around 1250Hz (second sensor 1239Hz). Didn’t we set 800Hz (or 1600Hz). See the first screenshot below.
please suggest how to achieve desired frequency
First, you are not setting the ODR correctly; you need to use hard coded params: MBL_MW_ACC_BOSCH_RANGE_4G
Second, you need to make sure that if you set it at 800z, that you are logging and not streaming.
HI Laura
I have used the example MetaWearApiTest and tested with various combination none of those are producing the desired frequency which we set
is the frequency which we set considered in firmware though mbl_mw_acc_set_odr or any other method available ?
Furthermore, I am using a logging mechanism not steaming below is code which used
func startLogging(selectedFrequencyValue:Float, SelectedScale:Int) {
guard let device = device else {
return
}
device.connectAndSetup().continueWith(.mainThread) { t in