Skip to main content
Version: 3.9

World Pose System (WPS)

What is World Pose?

The Lightship World Pose System (WPS) provides the 3D position and orientation of the phone in geographic coordinates as an alternative to using device GPS and compass heading data. WPS provides greater accuracy and frame-to-frame stability than standard GPS positioning, making it more suitable for AR applications. As the user moves around, WPS continuously maintains the device's position, improving accuracy over long periods of time and long distances.

WPS will work in any location where the phone has a GPS signal, but the accuracy will vary depending on GPS accuracy.

What can WPS be used for?

Any application that uses GPS locations or compass heading orientations can be improved by the increased accuracy and stability that WPS provides. There are also new types of AR experiences that combine WPS with existing geographic data, such as:

  • Creating a third-person view showing the accurate 3D position of the device a map
  • Using geographic data to augment the camera view or provide context for procedural generation
  • Replacing the map data with a virtual world that mirrors real-world topology which a player can explore by walking around.

To see some of the WPS use cases in action, try out the Sample Project.

The improvements to stability granted by WPS can be seen side by side with the device compass in the below image.

Side-by-Side showing world pose against the device compass

Enabling WPS

Adding the ARWorldPositioningManager to the XROrigin component in the Hierarchy will enable the World Pose System in your project. This will automatically add an ARWorldPositioningCameraHelper to the Main Camera. For applications requiring the more accurate compass and GPS properties provided by WPS, these can be accessed directly from the CameraHelper.

The World Pose Manager viewed in the Inspector.
Click to reveal WPSCompass.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Niantic.Experimental.Lightship.AR.WorldPositioning;

public class WPSCompass : MonoBehaviour
{
[SerializeField] private ARCameraManager _arCameraManager;

private ARWorldPositioningCameraHelper _WPSCameraHelper;

// Start is called before the first frame update
void Start()
{
_WPSCameraHelper = _arCameraManager.GetComponent<ARWorldPositioningCameraHelper>();
}

// Update is called once per frame
void Update()
{
float heading = _WPSCameraHelper.TrueHeading;
Quaternion rotation = Quaternion.Euler(0, 0, heading);

double latitude = _WPSCameraHelper.Latitude;
double longitude = _WPSCameraHelper.Longitude;
}
}

For placing objects anchored to World coordinates using the World Pose System, please see How to Build an App Using the World Pose System (WPS).

How does World Pose work?

WPS combines GPS, compass heading, and ARKit/ARCore tracking data from the session to produce a more accurate result. WPS requires the camera to be enabled for the ARKit/ARCore tracking, but the camera view doesn’t need to be visible to the user.

WPS FAQ

Why use WPS instead of the device GPS and compass heading?

WPS provides a more accurate compass heading and latitude/longitude position than is available from standard platform APIs. It fuses GPS and heading data with AR tracking and camera frame data to create frame-to-frame stability which is more suitable for rendering virtual content. It also provides the same Unity interface across all platforms, providing helper classes to simplify working with geographic data and removing any worries about device-specific GPS issues.

Under what conditions will WPS not work at all?

WPS will fail when there is no GPS signal or when the AR tracking cannot work reliably. GPS will usually be unavailable when the device is underground or inside some buildings. AR tracking will often fail in darkness and in moving vehicles. Avoiding these situations will ensure that apps work reliably.

How much data does WPS transfer?

WPS processes all data locally on the device. Any data that WPS transfers is for telemetry purposes only.

How will WPS impact device performance and battery life?

WPS uses approximately 10% of one CPU thread and should not have significant impact on any application that is already using ARKit/ARCore. Its battery consumption is comparable to that of the screen and 3D rendering, so it is suitable for long sessions.

How accurate is WPS?

The accuracy depends on the quality of the GPS signal. In good conditions, WPS is accurate to less than one meter with a median accuracy of about three meters. In rare situations (less than 10% of usage), users can be placed up to ten meters from the correct location, so applications should be designed with some error tolerance.