How to filter and smooth the data using mbl_mw_dataprocessor?
I have a metamotion R sensor and I have used the high pass filter to filter the data using mbl_mw_dataprocessor_highpass_create. Now I would like to use mbl_mw_dataprocessor_average_create to smooth the data.
filtered = libmetawear.mbl_mw_dataprocessor_highpass_create(acc, 50, None, fn_wrapper)
libmetawear.mbl_mw_dataprocessor_average_create(filtered, 25, None, fn_wrapper)
While doing this I am getting an error called as > Segmentation fault (core dumped)
How do you filter the data suing mbl_mw_dataprocessor_highpass_create and then smooth it using mbl_mw_dataprocessor_average_create? Can you someone help me out with this?
Thanks
Comments
Are you waiting for the callback from the sensor to make sure the dataprocessor has been created?
Please take a look at this example:
https://github.com/mbientlab/MetaWear-SDK-Python/blob/master/examples/acc_threshold_detector.py
https://github.com/mbientlab/MetaWear-SDK-JavaScript/blob/master/examples/acc_thresh_detect.js