Morning,
I have hunted around StackOverFlow for about an hour and found lots of sample code (mainly github) for creating Augmented Reality apps that display where a 2nd location is relative to your current location (e.g. New York).
However, I noticed that none of these are using the Gyroscope functionality provided in the iPhone 4 that gives a far smoother experience to the end users.
Does anyone know if such an example of sample code exists?
Cheers,
Charlie
I don’t know of any code sample, unfortunately.
A problem common to all AR apps is that you need to find out the orientation of your device. You can do that with atan2 and the accelerometer, but it has an unholy amount of noise (as seen in Apple’s AccelerometerGraph sample project). If you try to fix it with an adaptive low pass filter you reduce the noise but you also make it less responsive.
The gyro doesn’t have noise but error accumulates fast enough that you have to constantly reset the position using the accelerometer. It seems good to rotate an object, but not to replace the compass.