views:

170

answers:

2

Just started to realize an augmented reality based project, got GPS location, heading, and the two missing variable to manipulate virtual camera is Pitch/Roll.

I'm wondering if there is a ready-made formula I can merge into the project. Could spare me a lot of time. Thanks in advance.

+2  A: 

I think this post about the iphone accelerometer will answer most of your questions, including sample code.

jilles de wit
Ohh, so simply pitch=acceleration.x, roll=acceleration.y. And the acceleration.z component tells me if the device is upside down somehow. Thisone will help me to create somehow the "360 degrees free camera". Thanks jilles.
Geri
A: 

I've got into the problem since, so a realy detailed post about the solution can be read here:

Get pitch and roll angles from the iPhone's accelerometer vector at gotoandplay.freeblog.hu

Geri