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 (Margin of Error)

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

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