# mobile acceleration/rotation

Ben Rubinstein benr_mc at cogapp.com
Thu Jan 14 06:06:23 EST 2016

```Thanks Jim.

So if the device is vertical at rest (y=-1), and falls down vertically, it
won't register any acceleration because it's already measuring the maximum in
that axis?

In short, it's static acceleration rather than dynamic acceleration, is that
correct?

Many thanks,

Ben

On 13/01/2016 17:11, Jim MacConnell wrote:
> The device can't measure actual acceleration. It measures the forces on
> sensors in 3 axes. One of those axes will feel force from gravity. That's
> the 1.
> Jim
>
> -----Original Message-----
> From: Ben Rubinstein [mailto:benr_mc at cogapp.com]
> Sent: Wednesday, January 13, 2016 5:08 AM
> To: Use LiveCode
> Subject: mobile acceleration/rotation
>
> Hmmmm - I've just tried reading the acceleration and rotation sensors.  I
> admit to finding the whole business confusing, but it seems to me that the
> data accompanying the accelerationChanged message represents the static
> orientation of the device.
>
> At first I thought that the "rotation" and "acceleration" had been swapped -
> but then I realised it wasn't "rotation" but "rotation rate".
>
> At any rate, the readings I'm getting for acceleration, with my phone lying
> flat on the desk, have x and y approximately 0, and z at -1.  If I bring the
> phone upright on its short end, y shifts to -1 and z to 0.  If instead I
> bring it upright to lie on its left edge, x goes to -1 and y and z to 0; if
> I bring it upright on the right edge, x goes to 1, y and z to 0.
>
> These seem perfectly reasonable things to me, i.e. they seem to represent
> the state of rotation around the various axes; but I don't understand how
> they relate to acceleration.
>
> Can someone explain this to me?
>
> Many thanks,
>
> Ben
>

```