Making compass technology “Glorious”: what we improved in the Indoorway’s newly-released SDK

When it comes to indoor positioning, one of the most common problems is handling a compass. I can safely say that working with it on a mobile device is (gently speaking) not easy. Usually it’s just impossible to predict the result that will be displayed on the end-user’s device.
In a simple 2D view the problem with a compass is not that critical. In the worst case, it indicates the wrong heading. But applications that use augmented reality painfully suffer when this problem occurs. These types of applications refuse to work properly as the user comes close to a wall, a computer, or any other objects that interfere with the magnetometer.
In AR applications the compass has to work at all times, not only when the smartphone is in its regular position, but also when it is rotated or even when the phone is turned upside down. Everything must work buttery smooth. The combination of the user’s location with augmented reality gives enormous opportunities. Actually, at this point only your imagination is the limit.

In the latest version of Indoorway SDK we decided to address this issue by making the Technology Preview version of our module available to the public. The improved compass is the result of hard work of our “super-secret” development department.
So far, the new version is only available for Android, but we’re working on iOS too. It will be ready for the upcoming release of the iOS SDK.
Getting ready
The improved compass is available for devices that provide the following properties in Android’s SensorManager: Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_GRAVITY, Sensor.TYPE_GYROSCOPE.
In the following examples I assume that our Location service is properly configured and enabled. The object serviceConnection is an instance of IndoorwayLocationSdk. Find more information about Indoorway Location service on the subpage in our Help Center.
The SDK provides features to support changes in three Euler’s angles: heading, pitch and roll. Then you will be able to use callbacks as below:
…and that’s it! If any problems with the compass occur, you need to give a user the permission to configure it manually. We have provided IndoorwayCalibrationCompassFragment. An example of its use is presented below:
Our compass in the wild
A more practical use can be found on our GitHub profile (which I recommend you to follow). We have released CoffeeHunt — a fully-fledged AR game with its source code released on Apache License 2.0. Actually, you can do with it whatever you want :) The latest version of CoffeeHunt has been adapted to work with the new API.
Less advanced users can download the game directly from Google Play, and see how our improved compass works in practice! As it is a preview version of this API, we’re looking forward to your feedback on our discussion forum.
We’ve also released a new version of Indoorway Map for Android — our simple map testing tool. This release works with the improved compass, so you can test it too.
More changes in Indoorway SDK 1.4.1
The improved compass is undoubtedly an exciting new feature we have added to our SDK. But it is not the only one.
In the new version of SDK for Android we have applied a method for manual registration of end users. As a result, products that use our SDK can be integrated with identity providers. This is only a sneak-peek of what we want to show you in the following months! We also added the ability to search for objects on the map by geographic location. Additionally, we improved the accuracy of the reported location both on Android and iOS.
What do you think about the recent update? Join our community and let us know!

