olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
796 stars 225 forks source link

iOS device - world alignment set to gravityAndHeading but is out vs compass #170

Open jbardu opened 2 years ago

jbardu commented 2 years ago

so if I create a node at 0,0,500 (or any z distance) and world alignment is set to gravityAndHeading and the object is a sphere, it should be exactly 'north', (true north).

But consistently it is out by about 10-25 degrees in the real world. To see it straight on, the phone is not pointed north.

So perhaps device sensor fusion getting bad signals from the compass?

But the compass (app) is correct. When the camera faces the distant north object square on, the compass is not reading due north, and in flutter, polled compass readings also agree with compass app and disagree with ARKit.

So now I'm not sure why world alignment in ARKit does not agree with the direction the actual device faces? The puzzling thing is the error is systematic. It isn't like ARKit has randomness, it depicts the world rotated counter clockwise by about 20 degrees every single time?

There are a lot of apps in the store that claim to be AR navigation or compass etc but I am unsure if they they use ARKit with gravityAndHeading or are just plotting things on the camera view so I can't determine where the problem might be..