Navigation App

Navigation App

1.   Introduction

1.1 Navigation App

  1. An application that helps you easily to find places around your location using GPS. Especially the app is integrated Augmented Reality[1], which allows places to be placed within the Augmented Reality world using real-world coordinates.
  2. Written for both iOS (use ARKit[2] – Apple) and Android (use ARCore[3] – Google).

1.2 How Navigation App Works

  1. Uses GPS to get your location.
  2. Uses AR to track your device’s motion sensors, combined with visual information from the camera, to track the real world.[4]
  3. Then takes this tracking information, maps the features in the real 3D world to your 2D screen.
  4. Contrast is very important to detect the surface. The camera works well as if the surface is not too white or dark.

 

2.   Requirements

2.1 iOS

  1. iOS 11 or later.
  2. Device: A9 processor or later (iPhone SE, 6S and up, all iPads Pro models, iPad 2017 and up).[5]
  3. Xcode 10.2.1 or higher.

2.2 Android

  1. Android 7.0 (Nougat) and later.
  2. Device: A full list of all supported devices is available here.[6]
  3. Android Studio 3.1 or higher.

 

3.   Quickstart for iOS

3.1 Start Xcode.

3.2 Choose File ➤ New ➤ Project.

3.3 Click the Augmented Reality App icon and click the Next button. Xcode asks for a product name, organization name, organization identifiers.

3.4 Content technology ➤ SceneKit.

3.5 Info.plist:

  • Add “Privacy – Camera Usage Description”, “Privacy – Location When In Use Usage Description” keys and descriptions.
  • In “Required device capabilities”: Type “arkit”.

 

4.   Quickstart for Android

4.1 Start Android Studio.

4.2 Choose File ➤ New ➤ New Project.

4.3 Add JitPack in root build. gradle at the end of repositories:

4.4 Add the Sceneform library in app build.gradle.

4.5 Add permissions, enable ARCore in Manifest.

5.   Main Features

5.1 Show places around your location, they’re arranged on the screen like real-world coordinates, distances between your position with places. You can also move places to other positions on the screen. Besides that when you move with the device, places’s distance is updated too.

5.2 Show and search categories and places list. You can also choose to show or hide places on the screen.

5.3 Support multiple languages.

5.4 Show a place’s information. You can see the information about the place that you chose.

6.   Impression

6.1 The position taken from GPS has a gap compared with the actual position.

  1. To be honest, the compass on your phone is never absolutely accurate. For this reason, places that are placed on-screen are also not perfect sometimes, for instances they will appear very far away.
  2. Has a little difference between iOS with Android. Your locations have not the same value even when you put devices at the same place so that the places displayed on the screen are also different.
  3. Elevation of devices is different too, for example: on Android devices, sometimes they can’t get elevation in during time using the app.

6.2 Display places in AR world on the device.

  1. Development for mapping the real places into AR world in the device’s camera took a great amount of time. Because sometimes location SDK does not work properly so during that moment we can’t determine locations in AR. In simple terms, to display a place in AR world:
    –  Step 1: From ONE place’s information, calculate the distance between the device’s location with the place’s location. Next, we create a temporary view containing the title and distance of that place.
    – Step 2: Convert distance from step 1 to AR world coordinate system(x, y, z).
    – Step 3: Scale the view (step 1) proportional to the value (step 2) then add that view into AR screen.
    – P/S: Update the place’s distance after a fixed period of time to guarantee UI is updated while you’re moving.
  2. Besides that, to sort all places by their distance to see them clearly, but when a place’s too near your position, its altitude’s effect to display.
  3. Finally, how to move a place without effecting on the others that still arranged on camera.

6.3 Battery should be noticed.

  1. We have two main things that quite drain battery, camera and GPS. They’re always turned on when using the app. Because of that, your device will become hot at that moment.

7.   Improved things

To bring comfortable feeling to users while using the app, we’ve applied some solutions to improve the performance of the app

7.1 Places are arranged in order by their distance.

  1. Places with shorter distances are displayed in front of the others on both iOS and Android devices. To display all places on screen that you can see them clearly, you must scale them by their distances in real-world coordinates and arrange them suitable for with device coordinates.

7.2 Prevent to redraw all of the places on the screen.

After a fixed period of time, the app will re-render all places on the screen to guarantee that distances from your location to places are updated to new values. However,

  1. If your location doesn’t change in 10 meters radius, the app will not re-render all places’s UI.
  2. While moving a place on the screen, the app will not redraw UI.

 

8.   Thanks

In the app, we’ve used libraries that include ProjectDent[7] (iOS) and Appoly[8] (Android).

 

9.   References:

[1] https://en.wikipedia.org/wiki/Augmented_reality

[2] https://developer.apple.com/augmented-reality/

[3] https://developers.google.com/ar/

[4] https://developers.google.com/ar/discover/concepts

[5] https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

[6] https://developers.google.com/ar/discover/supported-devices

[7] https://github.com/ProjectDent/ARKit-CoreLocation

[8] https://github.com/appoly/ARCore-Location