I've been working to try to find the acceleration, velocity, and distance traveled from the accelerometer and I just have a few questions:
1. What is the default sensitivity of the accelerometer? I've read that this can be changed, but I haven't seen how to do so.
2. I've found the following equation that finds the acceleration due to gravity from the sensor reading. It requires knowledge of the sensor values at zero, +1g, and -1g acceleration and I was wondering if my values are accurate and/or if this is an appropriate function to use to determine acceleration.
z = 2(y - A) / (B - C)
A = sensor value at zero acceleration (I've found this to be around 500)
B = sensor value at +1g acceleration (around 660)
C = sensor value at -1g acceleration (around 330)
y = current sensor value
z = acceleration value
Multiplying z by 9.8 will convert z into meters per second squared.
3. I've somewhat been able to affect the behavior of the sample numbers, but I'm not quite sure what I'm supposed to be seeing. For example, if I move the accelerometer in the positive-y direction, how should the y-value be affected?
I have a general idea how the accelerometer works, but I'm looking for verification on how I'm using the data. Also, any documentation and/or suggestions regarding the accelerometer would be appreciated. Thanks.
I’ve added the first draft of the AccelerometerAPI documentation to the wiki. It is located here: http://bugcommunity.com/wiki/index.php/Accelero…
We’ve added this functionality to the SDK and should be there in the next integration build. Which you can download from here: http://buglabs.net/sdk
In addition, until a later software release you can peek here: http://cvs.buglabs.net/cgi-bin/viewvc.cgi/com.b…
for some java code (convertToGs() method) that does the conversion.
Looking forward to hearing from you.