Understanding accelerometer with iPhone

When you add a method for (void)acceleratedInX:(float)xx Y:(float)yy Z:(float)zz to any UIApplication, the iPhone sends regular messages to your application giving you values for X, Y, and Z.

X = Roll X corresponds to roll, or rotation around the axis that runs from your home button to your earpiece. Values vary from 0.5 (rolled all the way to the left) to -0.5 (rolled all the way to the right).

Y = Pitch. Place your iPhone on the table and mentally draw a horizontal line about half-way down the screen. That’s the axis around which the Y value rotates. Values go from 0.5 (the headphone jack straight down) to -0.5 (the headphone jack straight up).

Z = Face up/face down. I expected the Z value to correspond to yaw. And it does not. It refers to whether your iPhone is face up (-0.5) or face down (0.5). When placed on it side, either the side with the volume controls and ringer switch, or the side directly opposite, the Z value equates to 0.0.

Cited from: http://www.tuaw.com/2007/09/10/iphone-coding-using-the-accelerometer/

Blogged with the Flock Browser
Advertisements

One Response to “Understanding accelerometer with iPhone”

  1. Sankar Chandra Bose Says:

    Hai Praveen!
    When i was browsing,i came across your blog,it’s really wonderful,i am fresher and i have joined in a small IT company here at Coimbatore.I have been put into iPhone,here there are no experienced people in iPhone,Only a person who is of some 10months experience is here,but he also doesn’t have in depth knowledge.Your blog contains a lot of information which are organized in a perfect way.Thanks a lot for posting useful information.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: