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

GetPose

Convert a position and orientation in the global coordinate system to a pose in the device's AR tracking space.

Declaration​

public XRVps2Pose GetPose(XRVps2Localization localization, LocationInfo location)

Summary​

Convert a Unity LocationInfo to a pose in the device's AR tracking space using the provided localization.

Remarks​

LocationInfo.altitude is passed through unconverted, but NSDK expects altitude above the
WGS84 ellipsoid. On iOS, Unity reports mean sea level altitude, so the resulting pose can be off
vertically by tens of meters; use the overload taking an explicit ellipsoidal altitude instead.

Returns​

The AR pose corresponding to the given location.

Parameters​

NameTypeSummary
localizationXRVps2Localization
The localization snapshot to use for conversion.
locationLocationInfo
The LocationInfo containing latitude, longitude, and altitude.

Overload​

public XRVps2Pose GetPose(XRVps2Localization localization, double latitude, double longitude, double altitude, Quaternion orientationEdn)

Summary​

Convert a position and orientation in the global coordinate system to a pose in the device's AR tracking space.

Remarks​

The geolocation can be any location, not just the device's; the result is where it lies in AR
session space, and does not depend on the current camera pose.
In most cases you want the overload that uses the latest localization automatically; use
this one only when a batch of geolocations must share a single snapshot.

Returns​

The pose of the given geolocation in AR session space, with position in meters.

Parameters​

NameTypeSummary
localizationXRVps2Localization
The localization snapshot to use for conversion.
latitudedouble
WGS84 latitude, in degrees.
longitudedouble
WGS84 longitude, in degrees.
altitudedouble
Altitude in meters above the WGS84 ellipsoid (not mean sea level).
orientationEdnQuaternion
Orientation relative to the local East-Down-North frame, passed to
NSDK as is: it is not in Unity axes. Quaternion.identity aligns the pose with that frame.