C Specification

The xrLocateGeospatialPoseFromPoseANDROID function is defined as:

// Provided by XR_ANDROID_geospatial
XrResult xrLocateGeospatialPoseFromPoseANDROID(
    XrGeospatialTrackerANDROID                  geospatialTracker,
    const XrGeospatialPoseFromPoseLocateInfoANDROID* locateInfo,
    XrGeospatialPoseResultANDROID*              geospatialPoseResult);

Parameters

Parameter Descriptions

Description

The xrLocateGeospatialPoseFromPoseANDROID function converts a pose in XrGeospatialPoseFromPoseLocateInfoANDROID::space to a geospatial pose. If the state of geospatialTracker is not XR_GEOSPATIAL_TRACKER_STATE_RUNNING_ANDROID, the runtime must return XR_ERROR_GEOSPATIAL_TRACKER_NOT_RUNNING_ANDROID. If the function returns XR_SUCCESS, the XrGeospatialPoseResultANDROID::poseFlags field of geospatialPoseResult determines which output fields are valid. If XR_GEOSPATIAL_POSE_POSITION_VALID_BIT_ANDROID is not set in XrGeospatialPoseResultANDROID::poseFlags, the application must not read the fields XrGeospatialPoseANDROID::latitude, XrGeospatialPoseANDROID::longitude, XrGeospatialPoseANDROID::altitude, XrGeospatialPoseResultANDROID::horizontalAccuracy or XrGeospatialPoseResultANDROID::verticalAccuracy in XrGeospatialPoseResultANDROID. If XR_GEOSPATIAL_POSE_ORIENTATION_VALID_BIT_ANDROID is not set in XrGeospatialPoseResultANDROID::poseFlags, the application must not read XrGeospatialPoseANDROID::eastUpSouthOrientation or XrGeospatialPoseResultANDROID::orientationYawAccuracy. If XR_GEOSPATIAL_POSE_POSITION_VALID_BIT_ANDROID is not set, XR_GEOSPATIAL_POSE_ORIENTATION_VALID_BIT_ANDROID must also not be set.

If the accuracy is lower than expected, this may be an indication that the device is not utilizing VPS localization. The application can instruct the user to point their device at signs and buildings to improve localization.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_GEOSPATIAL_TRACKER_NOT_RUNNING_ANDROID

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_TIME_INVALID

  • XR_ERROR_VALIDATION_FAILURE

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2026 The Khronos Group Inc.