Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.XRSubsystems ←XRVps2Subsystem

TryGetGeolocation


Declaration​

public bool TryGetGeolocation(Pose pose, out XRVps2Geolocation geolocationOut)

Summary​

Convert a pose in the device's AR tracking space to a position and orientation in the global
coordinate system, using the latest VPS2 localization. The inverse of
TryGetPose.

Remarks​

The heading is the direction of the pose's forward axis projected onto the horizontal plane,
which matches CameraDirection in GetDeviceGeolocation.
DeviceTop is not offered because it depends on the display
orientation, which an arbitrary pose does not have. The heading is not meaningful when
the forward axis points straight up or down, or close to it.
The pose can be any pose, not just the camera's.

Returns​

False if VPS2 has not localized yet, in which case geolocationOut is default.

Parameters​

NameTypeSummary
posePose
The pose in AR session space (not composed with the XR origin), with position
in meters.
geolocationOutout XRVps2Geolocation
The geolocation of pose.