Moving site

Moving site

If your site is moving, the NAO Suite will need some additional information to offer the same capabilities as for static sites, especially to be able to use the phone motion sensors.

Prerequisites

Process

  • Ask Pole Star to configure your site to accept moving site information from your app. If the reference heading of your site is not aligned on the North, provide that information to Pole Star.
  • Implement the integration guidelines described in the next sections.

Integration guidelines

setExternalLocation API

Description

Android

void setExternalLocation(android.location.Location yourSiteLocation)

iOS

(void) setExternalLocation:(CLLocation *)yourSiteLocation

Call sequence

Put the location information (location in lat/long and heading) about your moving site in a Location (Android) or CLLocation (iOS) object, and call the setExternalLocation method on your locationHandle object that you should already have created in the initial integration phases.

Android

handle.setExternalLocation(locationObject)

iOS

[[locationHandle setExternalLocation] yourSiteLocation: /* your (id<CLLocation >) */];

This call should be performed:

  • After having received an onEnterSite() (Android) or didEnterSite() (iOS) callback. This step is the most critical one, and works for mono-site as well as multi-sites API Keys.
  • After each of these events:
    • Significant change in heading (>+-5°);
    • Significant change in latitude/longitude (>+-1 degree in latitude or longitude);
    • Significant distance covered (>2km)
    • No update for 2 minutes.

Behavior

Once the setExternalLocation API is called, the passed compass offset will be used until a new call to the setExternalLocation is made, or until the NAO SDK is either killed or destroyed.

NAO_COARSE_LOCATION NAOLocationHandle status

If you do not call the setExternalLocation API, the location engine will stop using the motion sensors of the phone, and the NAO_COARSE_LOCATION location status update will be sent to the application through the didLocationStatusChanged() and onLocationStatusChanged() callbacks, respectively for iOS and Android.

You can decide at the application level what to do with that information (show a message to the user, disable the location feature, do nothing, …)

Warnings

Your App has the responsibility to update the external location information whenever possible.

Location precision in a moving site depends of the location and motion data provided to setExternalLocation().

Be sure to call setExternalLocation() only after NAOLocationHandle’s method start() has been called and an enter site callback has been received.


    • Related Articles

    • On-site wakeup

      On Android, the wake-up mechanism is slightly different from iOS as there is no similarly efficient way to register to iBeacon identifiers. Instead, we rely on Android OS Location (information provided by the Android API from a combination of GPS/GSM ...
    • On-site wakeup

      iOS provides a way to register an app with BLE beacons in such a way that even if the app is not running, a callback will be triggered when a user enters or exits the vicinity of a beacon.. Bluetooth must be active for the wake-up to work. To ...
    • Release 4.8

      Release V4.8.0 Date: 30 january 2019. Build: V4.8.0-R50afb77. New Features Location on Wi-Fi: NAO® SDK Android and iOS supports Wi-Fi Cell-ID as a sensor for the location service. Moving sites: If a site is moving on the Earth map, such a ship, you ...
    • Release 23.06 (NAO SDK 4.11.12)

      Versions Component Version NAO® Cloud 23.06 NAO® JS SDK 23.06 NAO® SDK iOS 4.11.12 NAO® SDK Android 4.11.12 NAO® Logger iOS 4.11.12 NAO® Logger Android 4.11.12 New Features NAO® Cloud New map supplier supported: WEMAP map format. Alert ...
    • ExitSite Management

      NAOSDK – ExitSite This callback is triggered when the NAO SDK determines that the user is no longer near the site beacons. By default, this interface is notified 5 minutes after the last BLE measurements are received by the NAO SDK. In version 23.03 ...