Skip to content

Orientation and Compass

Most map / location technologies rely on the magnetic compass that is found in most smartphones. This compass uses the magnetic field to deduct where the North pole lies and show orientation of the device accordingly (eg. 15 degrees East).

Compass is a low cost but very useful sensor; however, compass is not designed to work in indoor environments. Due to high RF concentration in indoor environments, caused by WiFi signals, lighting and other signal sources, compass fails to work indoors.

Compass is not reliable

At Pointr, we quickly realised compass is unreliable for indoor sites hence we devised a proprietary technique (patent-pending) to calculate device orientation, without using compass. This special technique (also called calibration) allows us to calculate device orientation in any environment.

When an app is first started, a calibration process is started as well. However, for calibration to complete, the user needs to displace 5-15 metres in a Pointr-enabled environment (ie. where Pointr infrastructure is installed). This allows our SDK to calculate user movement patterns among other parameters which are then used to determine device orientation. Please note this process is not dependent on time. This is explained in the table below:

Event When will SDK calibrate? Notes
User starts the app and starts walking straight After 5-10 metres of walking
User starts the app and walks in arbitrary directions (eg. zig zags) After 10-15 metres of walking
User starts the app under a beacon and waits Never Unless user moves, the SDK will not be able to calibrate

Using Compass for the initial orientation

Upon design requirements, assuming our on-site tests yield ‘ok’ compass results, we may choose to use compass at the start until calibration. This allows the SDK to show an initial orientation, as soon as the app is opened, calculated using site’s global coordinates on Earth. However, as soon as SDK calibrates, compass orientation is stopped.

Note: Compass is highly unreliable indoors, so for almost all cases, this is not recommended.

Test Compass for yourself

Get several smartphones and run a Compass app on each and place them next to each other, facing in the same direction and orientation, on a static table. More than 50% of the time, you will notice that device compass readings vary, even up to 180 degrees off.

Image - 5 different iPhones laid on a table running the default Compass app, showing different results

Map Tracking Modes

Pointr supports the following map tracking modes:

  1. Free mode NoTracking
    • Users can browse the map freely. They can drag, zoom in/out, change levels on map and map will stay intact.
  2. Tracking mode LocationTracking
    • Map will track the user by locking the user position in the centre. In this mode, the map stays static whilst the user position pin rotates as the device rotates. Note that if position calibration hasn’t happened and the initial compass is disabled, then the pin will show as a circle, without showing any orientation.
  3. Rotational tracking mode LocationTrackingWithRotation
    • Identical to tracking mode, except, map rotates while user position pin stays static (looking upward). Note if user position is not calibrated, it is not feasible to rotate the map (since device orientation is not determined accurately). Therefore, it will act as (2) until calibration. Once position is calibrated, it will start rotating the map.
  4. Path tracking mode PathTracking
    • Default option for pathfinding, regardless of user’s actual position or orientation, map is rotated to ensure path is always pointing upward.
No Tracking (no location detected) No Tracking (location detected) Location Tracking Rotational Tracking Path Tracking

Path Tracking experience for Android and iOS:

UX Clarifications

Question: What happens to the “Tracking mode” button if the user’s location is not available?

“Tracking mode” button should go inactive / pale to indicate that it is not possible to locate the user at this time. If the user taps on the button, it should show an error message as below:

Case Message
Location permission missing “Location cannot be found when authorization is not granted. Please grant location authorization from Settings and try again.”
Location services turned off “Location cannot be found when Location Services are turned off. Please enable Location Services from Settings and try again.”
Bluetooth turned off “Location cannot be found when Bluetooth is turned off. Please enable Bluetooth from Settings and try again.”
Other “Position is not ready.”

What happens when the user taps on the “Tracking mode” button while in Free mode?

The button will change to tracking mode which will make map scroll to the user’s current position (changing level if needed).

Can I drag the map while in Tracking / Rotational Tracking / Path Tracking mode? If so, what happens when I drag?

Yes, users can always drag the screen as they wish. When the mode is tracking or rotational tracking, if the user drags to any location, the map should automatically go to Free Mode. This should also be the case when the map highlights a POI or when the user manually changes the level / building. During way-finding it automatically switches back to path tracking (rotational tracking on Android) after 3 seconds of user inaction.

When should the “Tracking mode” button show?

The “Tracking mode” button should always be visible.

By default, which modes are available when location is available, when it’s not available and when path-finding is active?

CASE 1: Location not available Only free mode is available and the button should display a specific icon for location unavailable

CASE 2: Location available Free, tracking and rotational tracking. Tapping the button will make the current mode cycle between these 3.

CASE 3: Path finding active Path tracking mode only.

Are there any auto switch modes by default?

Yes. By default we should auto switch modes on the following events:

  1. When starting path finding we should auto switch to path tracking mode.
  2. When cancelling or ending path finding we should auto switch to tracking in case location is available, or free mode in case it’s not.
  3. First time position is detected we should set to tracking.

Can I pinch to rotate? What happens to the mode?

Yes, you can always pinch to rotate and the current tracking mode will remain.


Last update: August 9, 2024
Back to top