GO Map & IndoorAtlas – Getting started
If you don’t know already IndoorAtlas… well you should!
IndoorAtlas is an Indoor Positioning System that will dramatically increase the accuracy of location based applications inside venues, offices and other buildings.
That combined with their recent Unity SDK makes possible developing a new kind of mobile apps oriented toward 3D indoors exploration, mixed indoor/outdoor location based gaming and AR apps.
“Indoor positioning systems (IPS) locate people or objects inside a building using radio signals, geomagnetic fields, inertial sensor data, barometric pressure, camera data or other sensory information collected by a smartphone device or tablet.”
With GO Map 3.1 using IndoorAtlas as the core Location provider is really a matter of minutes. A new IALocationManager.cs will take care of almost everything, giving you complete access to the IndoorAtlas SDK features.
But I really should emphasize another great advantage of using this unity SDK that is having a
NATIVE location API instead of the Unity default one.
In fact IndoorAtlas plugins works really well both in outdoors and indoors, better than than Input.Location api with more accurate location events. So that’s a huge bonus.
In this tutorial I’ll show you step by step how to get started with GO Map and IndoorAtlas.
Start by creating a new Unity project and import GO Map 3.1 from the Unity Asset Store.
Then download the IndoorAtlas Unity SDK from github, that contains this folders…
…and copy the “Plugins” and “androidwrapper” folders to the Asset folder of your new unity project. At this point it should look like this
Open the Plugins folder and delete this classes that are already contained in GO Map 3.1.
Heading
Location
Orientation
Region
Status
Basically everything except for the folders and the IaBehavior.
Search for the “Flat Map – IndoorAtlas” scene and open it.
The main news is that there’s a new kind of Location Manager that will use the IndoorAtlas native location updates to make GO Map and everything else in the scene work.
If you take a look to it you’ll find many of the classic Location Manager features like Zoom Level, World Scale and the desired accuracy.
Of course there still is a location dropdown for In-Editor test runs.
Other than the classic Location Manager Events, all the IndoorAtlas SDK updates are wrapped into Unity Events so that they can be used via Unity Inspector.
Now select the Location Manager Game Object and add another the IaBehavior Component to it. This step is crucial to make it work.
At this point you should make your account on the IndoorAtlas website and follow their walkthrough to get started and make your first location.
Basically you would have to do this simple steps:
- Register an account
- Setup the venue and upload your floor plan
- Map the venue using MapCreator2 for Android
The above is described in more detail in their workflow documentation here.
When you get your API Key and API Secret you can enter them into this component. Also set the Heading and Orientation Sensitivity to 0.001.
This demo scene is nothing more than the classic Flat Map but using the IndoorAtlas SDK updates.
The next steps of this tutorial will show you how to make an iOS build and try it on your phone.
From the iOS player settings set the target minimum version to iOS 8 ore more. That’s a requirement for IndoorAtlas SDK.
Install cocoa pods on your mac. If you haven’t yet, simply type
1 | sudo gem install cocoapods |
In the OSX Terminal and press enter.
That will install cocoa pods. And you’ll need it to install the IndoorAtlas iOS SDK in your XCode project.
Build and Run the application
Now one more thing before you go
Open again the OSX Terminal and go your xcode project path.
You can type cd, then drag and drop the xcode project folder and press enter.
At this point type
1 | pod install |
and press enter, this will install the IndoorAtlas.framework into your XCode project.
Now you can open the XCode workspace and build the app to your iPhone/Ipad.
You should see an overall improvement of your GPS position mostly inside the area you have mapped with the IndoorAtlas application.
The next steps could be adding a 3D model of the mapped building/venue to the scene and geolocalize it using the GOObject component.
This is the most frequent use case of GO Map users, but you can find plenty other IndoorAtlas use cases here.