Accelerometer G magnitude calculation and Avg data processor
Hello,
I am using MetaWear CPRO device with 1.2.5 firmware on Windows 10.
I trying to build an application to detect punches and their length, impact G, max forward G, etc.
My proposed solution is to calculate length of accelorometer vector and filter values greater than determined value. In the application I will do further calculations to match the values to a punch profile.
My data processor setup is below:
//odr:50f range: 16g
punchDetectorDelegates = new Dictionary<string, Fn_IntPtr>
{
//logger and log ready delegates..
//..
["comp"] = new Fn_IntPtr(avg =>
{
mbl_mw_dataprocessor_comparator_create( avg, Comparator.Operation.GTE, 4f, punchDetectorDelegates["punch"]);
}),
["avg"] = new Fn_IntPtr(rss =>
{
mbl_mw_dataprocessor_average_create(rss, 4, punchDetectorDelegates["comp"]);
})
};
//mbl_mw_dataprocessor_rss_create(acc_signal, punchDetectorDelegates["comp"]);
mbl_mw_dataprocessor_rss_create(acc_signal, punchDetectorDelegates["avg"]);
My questions:
1. Is my approach is suitable for punch detection? (I am ignoring gravity)
2. When range is set to 16, I am expecting maximum length of sqrt(16*16*3) ~ 27.71. Is this right?
3. When I send rss output to "comp" delegate, I get values that suits the above value. But when I send rss output to "avg" delegate, I get values above 27.71 like 31. what am I missing here? How avg proccessor find result that seems out of range?
This discussion has been closed.
Comments