Gravity gives you one frame of reference -- and the compass gives you another.
If you're just spinning, this is enough to give you 3D orientation. However, it is trickier if you are also accelerating. Let's say you accelerate horizontally at 1G. To the sensors, that will look the same as accelerating vertically at sqrt(2)*G, with the device oriented at a 45 degree angle. That's not fatal -- you know the orientation before the acceleration started, and can make some assumptions about maximum slew rate, etc. -- but it does mean you'll be accumulating error, need to continuously recalibrate, etc. I don't now how good a job you can do; I hope to experiment and find out soon, but other things keep appearing on my queue... It will require close monitoring off the sensors, and thus a lot of power. I really wish they'd put rate gyros on cell phones -- or at least a full set of accelerometers at diagonally opposite corners of the device. Rate gyros are better than "angular accelerometers", because they tell you the rate of rotation, not just the rate of change of rotation. One less integration = better accuracy and a built-in zero reference for the rate of rotation. On Apr 9, 9:14 am, Frank Weiss <fewe...@gmail.com> wrote: > I also thought getting angular movement from the accelerometer would be a > problem. However, note that it provides *proper acceleration*. You can track > the ambient gravitational field as a 3D vector. > > On Apr 9, 2010 4:55 AM, "Jason LeBlanc" <jasonalebl...@gmail.com> wrote: > > Well, if your just spinning the device on end, I would consider it's > "movement speed" to be Zero. Your interested in angular velocity, which is > not linear velocity. So the fact that 'velocity = distance/time' doesn't > matter for this scenario. Instead of a linear measurement like miles per > hour (mph), you'll want to determine revolutions per minute (rpm). > > So the real challenge is how do you take the information provided by the > device, and determine rpm. I haven't played around with it but I would > suspect you get accelerations on more than one axis due to rotational > motion. Additionally, I would be surprised if you are able to obtain any > useful information from the existing sensor. > > I haven't researched the hardware in the android devices, but I would > suspect they are "Linear Accelerometers". The device would need to be > equipped with an "Angular Accelerometer". > > However, if you are interested in calculating linear movement you'll need to > do a little research on Numerical Analysis. You should find ways to perform > calculus through mathematical techniques that are appropriate for situations > that utilize the collection of actual data. > > FYI - If you look under OS/Sensors on the API Demos there are some spinny > things and graphs to play with. > > J > > > > On Thu, Apr 8, 2010 at 7:41 PM, BobG <bobgard...@aol.com> wrote: > > > Acceleration * time gives veloc... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.