Acceleration minus acceleration from rotation
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 accelerationChanged. 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. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
Later devices have gyroscopes, that can detect non-rotation movement. That may help solve the original problem. On Feb 11, 2015, at 12:59 PM, Richmond richmondmathew...@gmail.com wrote: What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
THATS why cats always manage to land on their feet. Good to know. On Wed, Feb 11, 2015 at 11:06 AM, Richmond richmondmathew...@gmail.com wrote: On 11/02/15 20:04, Colin Holgate wrote: Later devices have gyroscopes, that can detect non-rotation movement. That may help solve the original problem. On Feb 11, 2015, at 12:59 PM, Richmond richmondmathew...@gmail.com wrote: What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. Well one thing I didn't mention in my previous message is that my cat has a gyroscope installed :) Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
On 11/02/15 19:35, Steven Chalmers, UI Insight, Inc. wrote: 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 accelerationChanged. 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. ___ I must be really stupid, but this message strikes me as a socking great leg-pull. So, here I am with my imaginary phone [ well a pink YEZZ phone if you want the truth ] lying on the kitchen table. My ever so slightly evil black and ginger cat flips the phone across the table. My phone does NOT react, NOR has any way of detecting the fact it has been moved. Now, let's step back a mo' and have a look at my iPad 1 [second hand, pitched at me by my second son who is so hi-tech it keeps me awake at night shaking . . . LOL] . . . now it can detect when I rotate it, so my desktop goes from portrait-to-landscape-to-portrait-to-landscape: wow, I can do that all afternoon; almost as orga***c as sitting in a launderette watching the laundry going round . . . but, I digress. What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. Now if I lift one side of my iPad and lift it up, so that the other side remains in contact with the table, the thing doesn't see that either. So . . . . . ??? Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
On 11/02/15 20:04, Colin Holgate wrote: Later devices have gyroscopes, that can detect non-rotation movement. That may help solve the original problem. On Feb 11, 2015, at 12:59 PM, Richmond richmondmathew...@gmail.com wrote: What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. Well one thing I didn't mention in my previous message is that my cat has a gyroscope installed :) Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
The accelerometers in the device WILL pick up a linear movement. Tilting it, changes the acceleration in an axis in relation to the direction of gravity. But applying force against the inertia of the accelerometers will definitely be picked up. On Wed, Feb 11, 2015 at 10:59 AM, Richmond richmondmathew...@gmail.com wrote: On 11/02/15 19:35, Steven Chalmers, UI Insight, Inc. wrote: 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 accelerationChanged. 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. ___ I must be really stupid, but this message strikes me as a socking great leg-pull. So, here I am with my imaginary phone [ well a pink YEZZ phone if you want the truth ] lying on the kitchen table. My ever so slightly evil black and ginger cat flips the phone across the table. My phone does NOT react, NOR has any way of detecting the fact it has been moved. Now, let's step back a mo' and have a look at my iPad 1 [second hand, pitched at me by my second son who is so hi-tech it keeps me awake at night shaking . . . LOL] . . . now it can detect when I rotate it, so my desktop goes from portrait-to-landscape-to-portrait-to-landscape: wow, I can do that all afternoon; almost as orga***c as sitting in a launderette watching the laundry going round . . . but, I digress. What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. Now if I lift one side of my iPad and lift it up, so that the other side remains in contact with the table, the thing doesn't see that either. So . . . . . ??? Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
On Wed, Feb 11, 2015 at 11:59 AM, Richmond richmondmathew...@gmail.com wrote: What my iPad CANNOT do, is detect if it is moved across a surface, for the very SIMPLE reason that it doesn't have little wheels or other motion sensors on its underside [ err . . . backside?]. AccelerationChanged delivers an X, Y, and Z parameters. If your cat slides the iPad perfectly to the right, you should see that two of the parameters (Y and Z?) stay at 0, but one of them (X?) changes, first to one sign (positive?) and then the other (negative?) as the iPad slows to a stop. If you're clever you can work out how far the iPad moved. To the larger question, rotationRateChanged also comes in X, Y, and Z params. Working out the math to isolate one from the other is indeed an interesting problem. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Acceleration minus acceleration from rotation
On 11/02/15 20:08, Mike Bonner wrote: THATS why cats always manage to land on their feet. Good to know. I am tempted to access the Git-hub code repository and attempt a Livecode build for the Cat platform . . . the main thing that is stopping me is that certain programming terms are not ready for that platform, there are various commands that need to be implemented such as BITE Type: function Syntax: bite(biter,target,style,threshold) See also: lick, chew Introduced: 7.0.4 Platforms: Mobile Supported Operating Systems: Cat,Dog,Komodo Dragon Summary: Returns true if an object interacts with another object, false otherwise Examples: bite(myCat,myLeg,aggressively,fastOnset) if bite(myCat,myLeg) then kick(myLeg,myCat,viciously,fastOnset) else kill(myCat,cruelly,slowOnset) end if answer bite(myCat,yourLeg,sadistic,slowOnset) use the bite function to determine whether or how an agent bites a target. Parameters: biter - an agent reference target - an object reference style - aggressively,viciously,sadistic,gently,sarcastically threshold - fastOnset,slowOnset,gradualOnset Value: The bite function returns true or false. Comments: You have to be daft to attempt to program a cat. - Feedback on this new set of functions welcomed. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode