WPS compass is not accurate enough

Info:

  • Issue category: WPS
  • Device type & OS version: Android
  • Host machine & OS version: Windows
  • Issue Environment : On Device
  • Xcode version: /
  • ARDK version: 3.15.0-2508040839
  • Unity version: 6000.0.53f1

Bug reproduction steps:

  • Build the ARDK examples
  • Run the WPS exampl

When running the WPS example, the compass is not pointing North. It’s off by quite a bit.

I want to use WPS to guide a user towards a location. For this, I would make a space ship fly around in the air in the general direction of this location. For this, the WPS compass needs to be accurate though. Is this a known issue? Or is there something I can do to improve it?

Hello,

Could you show a recording or screenshot of how the current compass looks? I’d like to test this as well and compare the outcome I get to what you’re getting.

I also see that you’re on ARDK 3.15. Can you double check the version of AR Foundation that was installed along with ARDK? We’ve been noticing that it’s been defaulting to AR Foundation 6 rather than 5.2.0 which is the currently supported version.

While I don’t think the AR Foundation version could be causing issues in this case, can you downgrade to the supported version and test it out just so that we cover all our bases?

Hello,

Thank you for your reply.

I was trying to upload a screen recording from the samples project, but unfortunately I am not able to do so since I’m a new user. Here is a screenshot to show what I mean:

The North in the WPS compass is always off by quite a bit. To be honest, this is one of the better times I was able to get it. For guiding a player to a location, this deviation would be too big I’m afraid.

I also tried changing the AR Foundation version, but I encountered a couple of issues. In Unity 6000.0.53f1 and with the lightship ARDK installed, the available versions in the package manager are the following:

  • 6.0.6
  • 6.1.0
  • 6.1.1
  • 6.2.0

I tried changing the version in de manifest file, but then it just defaults to 6.0.6 again when opening the editor. I tried uninstalling Niantic Lightship ARDK and then AR Foundation changed to version 5.2.0, but when I install the Lightship ARDK again, it just defaults to 6.0.6 again.

I also tried to change the editor version following this guide from your documentation: Sample Projects | Niantic Spatial Platform

But then I received the following error when trying to start the editor: “An error occurred while resolving packages: Project has invalid dependencies: com.unity.test-framework: Package [com.unity.test-framework@1.5.1] cannot be found.

Hope you can help with this.

Greetings,
Ewoud

Hello,

Thanks for the additional information. We have seen this issue crop up from time to time specifically with Android. What our engineers have been able to determine on their end from extensive testing is that a lot of Android phones don’t appear to have very well calibrated magnetometers which can lead to up to a 40 degree difference in the worst case when the applications first starts but the compass accuracy should improve as users walk around.

My recommendations would be to:

  • Walk around to calibrate the magnetometers while the compass is open
  • Have a look at this link on the Google support docs and try the figure 8 motion while the compass is open

Hey,

I see. Is there a way to detect this? For example in maps you sometimes get a popup to recalibrate using that figure 8 motion. If there was a way to detect it, we could give a popup to the users to walk around a bit more or calibrate the device. I thought the WPS status would give such indication, but as you can see, it is “available” when the issue occurs.

I had a follow up question. As stated, I was planning on guiding users to a location by means of a flying spaceship in between the users location and the GPS coordinates. Currently I go about this by adding a WPS object at the goal GPS coordinates, querying that objects transform.position and the DefaultCameraHelper.transform.position and placing the spaceship at a fixed distance along that vector. Does this seem like a good idea? Or is there something I’m overlooking with this?

Greetings,
Ewoud

Hi Ewoud,

For the calibration issue, ARDK doesn’t have a way to inform the user itself but it is known in the Android OS. You can refer to the post here to get an idea https://stackoverflow.com/questions/7099568/in-android-can-i-programmatically-detect-that-the-compass-is-not-yet-calibrated

For your other question. Are you guiding the user in some sort of dedicated area or just outside wherever they open the app? My main concern would be navigation since it sounds like it would tell the user where the location is but not necessarily a proper path for how to get there.