jaamun
jaamun

Reputation: 181

Augmented Reality Indoors

I am looking to have an augmented reality iphone app, in which the user scans the room from a fixed point. Therefore, it is possible indoors, as I am not using CLLocationManager and the digital GPS.

However, I am running into major issues. Somehow, the point of interest bubbles continuously change their location on the iphone screen, even though i am not moving. Once again, I am not using te digital GPS. I am using CMMotionManager in the following manner.

[motionManager startDeviceMotionUpdatesUsingReferenceFrame: CMAttitudeReferenceFrameXTrueNorthZVertical];

Can someone explain how using the CMMotionManager class might cause the fluctuation of my point of interests? And offer a possible solution? Thanks.

Upvotes: 1

Views: 444

Answers (1)

Matt Wilding
Matt Wilding

Reputation: 20153

The CoreMotion framework uses a gyroscope to deliver device motion updates, and gyroscopes drift over time. Additionally, when you tell the framework to use CMAttitudeReferenceFrameXTrueNorthZVertical, you're saying that you want to use the magnetometer to occasionally update the gyroscope's reference frame to keep it synced with a real-world reference frame. The compass on the device can suffer from interference, and is only occasionally used to correct for the drift.

Unfortunately the only thing can do is wait and hope that the framework's internals are magically improved by Apple.

Upvotes: 3

Related Questions