Acceleration minus acceleration from rotation

Steven Chalmers, UI Insight, Inc. Steven at
Wed Feb 11 12:35:13 EST 2015

I have played with, and understand, accelerationChanged and
rotationRateChanged but I have a complex requirement to remove the effect
of rotation from acceleration.

Imagine a phone lying on its back on the table.

1)  I want the acceleration numbers generated from tapping the phone on its
side which causes the phone to slide on the table, which is, of course, the
easy part.

2)  I want to eliminate the acceleration values generated from a rotation.
With the phone lying on its back on the table lifting one side, pivoting on
the opposite side of the phone on the table, will trigger both
rotationRateChanged and accelerationChanged.  accelerationChanged is
triggered because the center of the phone is effectively moving both
parallel to the table top and perpendicular to the table top as the phone
is rotated.  These are the acceleration effects I want to eliminate from

3)  To put it another way, if you slide the phone along the table while
also tilting it up on one side, or one end, or both, I only want the
accelerationChanged values for the slide and not for the tilt.

This is a complex math problem which is beyond my math skills.  I don't
expect anyone to offer this solution for free and as such I would be happy
to compensate for a solution.

Steven Chalmers
UI Insight, Inc.

More information about the use-livecode mailing list