Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Accelerometer calibration

I have an app that reads the Accelerometer 30 times a second and displays the results on the screen.  I am just using getLastAccelerationData.  Thing is that when I put the Storm on the table, the X value hovers around -108 and the Y around -36.  I have tried to smooth this out with a running average but it doesn't do anything.

 

Is my storm busted or is there some hidden way to calibrate the sensors?  I tried the usually battery pull.

 

Leigh

Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Accelerometer calibration

Working with the accelerometer of a BlackBerry device:

 

http://na.blackberry.com/eng/deliverables/7693/Working_with_accelerometer_of_BB_device_522761_11.jsp


Use Search. "Accept Solution" if the problem gets resolved.
Regular Contributor
Posts: 63
Registered: ‎12-24-2010
My Device: Torch

Re: Accelerometer calibration

[ Edited ]

The link above unfortunately does not help.

 

The problem is with *calibration* , i.e. in what units is the data returned by getLastAccelerationData() ?   If I put the phone flat on the table, shouldn't I get  x=0, y=0, z=-9.8m/s^2  ? I am not gettting anything close to a 0 for x...

 

EDIT:

Oh, I see: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/system/AccelerometerSensor.htm...  explains the units.