TryGetPose
Declaration
public bool TryGetPose(LocationInfo location, out XRVps2Pose poseOut)
Summary
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
False if VPS2 has not localized yet, in which case poseOut is default.
Parameters
| Name | Type | Summary |
|---|---|---|
| location | LocationInfo | The LocationInfo containing latitude, longitude, and altitude. |
| poseOut | out XRVps2Pose | The AR pose corresponding to the given location. |
Overload
public bool TryGetPose(double latitude, double longitude, double altitude, Quaternion orientationEdn, out XRVps2Pose poseOut)
Summary
Convert a position and orientation in the global coordinate system to a pose in the device's AR tracking
space, using the latest VPS2 localization.
Remarks
The geolocation can be any location, not just the device's; the result does not depend on the
current camera pose.
Returns
False if VPS2 has not localized yet, in which case poseOut is default.
Parameters
| Name | Type | Summary |
|---|---|---|
| latitude | double | WGS84 latitude, in degrees. |
| longitude | double | WGS84 longitude, in degrees. |
| altitude | double | Altitude in meters above the WGS84 ellipsoid (not mean sea level). |
| orientationEdn | Quaternion | 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. |
| poseOut | out XRVps2Pose | The pose of the given geolocation in AR session space, with position in meters. |
Convert a Unity LocationInfo to a pose in the device's AR tracking space, using the latest VPS2
localization.