jmac at consensustech.com
Wed Jan 13 12:11:19 EST 2016
Short answer: Gravity.
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
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?
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode