Results 1 to 3 of 3
  1. Goyena's Avatar
    Posts
    893 Posts
    Global Posts
    894 Global Posts
       #1  
    I've checked out the Accelerometer API and saw that the service can return 3d acceleration as well as device orientation on at least two axes, but three (does this mean that the Pre wouldn't know if it's spinning while standing on its bottom edge?).

    If it possible to calculate to calculate distance (and speed?) the Pre was moved using accelerator data? (assuming initial velocity was zero)
    Pixi Plus - Pre Plus - Pre 2 - Pre 3 - Touchpad 1 ;-)
  2. #2  
    The only data you get from the accelerometer is how many g's are on each of the three (x, y, and z) axes.

    so if the phone is standing upright, y = -1, x = 0, z = 0

    if upsidedown, y=1, x=0, z=0

    if face up on its back, z=-1, x=0, y=0
    facedown, z=1, x=0, y=o

    on the left side, x=-1, y=0, z=0
    on the right side, x=1, y=0, z=0

    of course the phone will rarely be in exactly these positions, plus there's always noise, so it's actually just very close to these values.

    and when the phone is tilted, the values will be between -1 and 1, depending on the tilt.

    now you go figure out how the hell to determine movement with that, cuz i haven't been able to yet! i can do orientation, but movement and gestures are eluding me.
  3. #3  
    i figured i should also state that the reason the values aren't all 0 when it's stationary is that there is always the power of gravity in at least one direction, so there's always going to be a total of 1g (unless it's in a vacuum or moving somehow)

Posting Permissions