I have acceleration data from a sensor. X Y & Z. I move the senor in the Y axis. Mostly in a straight line. So I ignore x & z.
From the sensor documentation 5.2.1 Acceleration output:
ax=((AxH<<8)|AxL)/32768*16g(g is Gravity acceleration,9.8m/s2)
ay=((AyH<<8)|AyL)/32768*16g(g is Gravity acceleration,9.8m/s2)
az=((AzH<<8)|AzL)/32768*16g(g is Gravity acceleration,9.8m/s2)
The data is in (m/s2)
I need a simple calculation that java or C# can take easily. I want to write something in code that calculates the acceleration over time to maximum velocity and average velocity. I need a "speed" value that I can display. For Ex. Max speed 12MPH and Average Speed 8MPH.
In this data the device was moved from the zero point to about 6 inches away less than 1 second.
Time(s) Acc X Acc Y Acc Z
48.547 0.4756 0.0864 1.2207
48.563 0.2051 0.2651 1.3350
48.563 0.0044 0.6621 1.3140
48.578 -0.2876 1.0117 1.4292
48.578 -0.0732 1.5586 1.4653
48.594 -0.0659 1.8984 1.3447
48.594 -0.2344 2.4453 1.4043
48.641 -0.2690 3.2148 1.3677
48.656 -0.4072 3.0083 1.4995
48.656 -0.2573 3.2700 1.3545