About OpenMoko Rotate
openmoko at mazikeen.demon.co.uk
Sat Sep 20 18:36:58 CEST 2008
On Saturday 20 September 2008, Vasco Névoa wrote:
> I haven't looked at the code yet, but my instinctive approach would be
> to calculate the direction of the "down" vector (constant 9.8m/s2
> acceleration) and then compare that to the phone's "down" direction. It
> is the difference between these two vectors that I am referring to. Even
> if the error is great, surely it is not superior to 45 degrees (a
> quarter turn)?
> Is this not the way it is done?
It doesn't do that at the moment - it's _very_ quick'n'dirty. I would
calculate the acceleration vector too, but ignore the direction if the
magnitude was to far from 1g as that would suggest something dynamic was
> Fox Mulder wrote:
> > This is not so easy to do. The rotation comes out of a calculation of
> > the values from acceleration sensors. There are no "angle" sensors for
> > this operation. So there is no way of exactly say which angle the neo
> > currently has instead these are just aproximations.
More information about the community