Skip to main content

Getting Geolocation with VPS2

Prerequisites

This guide assumes that you’ve already gone through the following guides:

Accessing Geolocation Estimates

VPS2 provides geolocation via a XRVps2Transformer. Retrieve the latest transformer and use it to convert between local AR tracking coordinates and global geolocation (latitude/longitude/altitude).

note

The transformer is a point-in-time snapshot. Updates to VPS2’s estimate are not reflected in previously retrieved transformer instances. To use the most recent estimate, explicitly fetch the latest transformer again.

Pose ↔ Geolocation

The transformer is a snapshot of VPS2’s current best estimate of the alignment between the application’s AR tracking space and the real world. It contains the metadata required to perform bidirectional conversions:

  • Pose → Geolocation: Provide the transformer and a pose (for example, the device pose or any pose in AR space) to compute latitude / longitude / altitude / heading.
  • Geolocation → Pose: Provide the transformer and a geolocation (latitude / longitude / altitude / heading) to compute a pose in AR space, enabling placement of latitude/longitude/altitude-authored content in AR.

Accuracy

The transformer contains a tracking state that can be Unavailable, Coarse, or Precise. These are broad categories describing the quality of VPS2's georeference estimate.

Each estimate also includes accuracy values that represent margin-of-error estimates. Accuracy will differ across multiple estimates done with the same transformer and different input pose/location.

  • Horizontal accuracy (meters)
  • Vertical accuracy (meters)
  • Heading / rotation accuracy (degrees)
Attention

VPS2 in version NSDK 4.0 beta 1 leans towards heavily overestimating the margin-of-error.