Game Development Reference
In-Depth Information
Common Accelerometer Specifications
To help you better experiment with accelerometers, we've collected the specifications
on a few of the most common accelerometers in use at the time of writing. The future
may hold cheap accelerometers based on quantum tunneling that can provide almost
limitless accuracy, but Table 21-1 outlines what you'll generally be working with for
now.
Table 21-1. Current common accelerometers
Device
Accelerometer chip
Sensor range
Sampling rate
iPhone/iPad/ Motorola Droid
LIS331D
±2 g *
100 Hz or 400 Hz
Nintendo Wii
ADXl330
±3 g x-/y-axis: 0.5 Hz to 1600 Hz
z-axis: 0.5 Hz to 550 Hz
Sony Six Axis
Not published
±3 g 100 Hz
The chip LIS221D is actually capable of two modes. One mode is ±2 g
and the other is ±8 g . This is dynamically selectable according to the
chips datasheet; however, neither iOS nor Android allows developers
to change the mode through the API.
The 2 g limit for phones can cause problems when you're attempting to record motion.
This limitation will be discussed later in this chapter. The larger range of Wii and Sony
controllers demonstrate that they are dedicated to gaming where larger accelerations
are expected.
Data Clipping
The human arm is capable of exceeding the ±2 g range of the iPhone's sensor easily. The
values reported by the API will actually exceed 2 g up to about 2.3 g . The accuracy of
these values that exceed the specification is unknown. Regardless, they are probably at
least as accurate as the option of trying to recreate the data, so if required they can be
used. All values above this upper limit will be reported as the upper limit such that if
you graphed the values, they would look like Figure 21-3 .
 
Search Nedrilad ::




Custom Search