Once you have configured your app's settings to use the Geospatial API, you can obtain the device camera's [`AREarthManager.CameraGeospatialPose`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose). This pose, managed in an [`AREarthManager`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager) object, contains the following information:

- Location, expressed in latitude and longitude
- Altitude
- An orientation approximating the direction the user is facing in the EUS coordinate system with X+ pointing east, Y+ pointing up, and Z+ pointing south

## Check the tracking state

Geospatial values are only valid while [`AREarthManager.EarthTrackingState`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) is [`TrackingState.Tracking`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html). Make sure to wrap all Geospatial API calls in a [`AREarthManager.EarthTrackingState`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) control block.

    var earthTrackingState = EarthManager.EarthTrackingState;
    if (earthTrackingState == TrackingState.Tracking)
    {
      // camera_geospatial_pose contains geodetic location, rotation, and
      // confidences values.
      var cameraGeospatialPose = EarthManager.CameraGeospatialPose;
    }

If [`AREarthManager.EarthTrackingState`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) does not become [`TrackingState.Tracking`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html), [`AREarthManager.EarthTrackingState`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) may be [`TrackingState.Limited`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html) or [`TrackingState.None`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html). If neither of these conditions are true, check [`TrackingState.EarthTrackingState`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate), which shows other error states that may keep the [`AREarthManager`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager) object from tracking.

## Adjust the pose for accuracy

When the device is upright in the default orientation, the pitch (X+) and roll (Z+) angles tend to be precise due to a natural alignment with AR tracking. However, the yaw (Y+) angles can vary depending on VPS data availability and temporal conditions at the location. Your app may have to make adjustments for accuracy.

[`GeospatialPose.OrientationYawAccuracy`](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy) provides an accuracy estimate for the yaw (Y+) angles for a certain [`AREarthManager.CameraGeospatialPose`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose). The orientation yaw accuracy is a number that describes the radius, in degrees, of the 68th percentile confidence level around the yaw angles in [`GeospatialPose.EunRotation`](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation). In other words, there is a 68% chance that the [`AREarthManager.CameraGeospatialPose`](https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose)'s true yaw angle is accurate within the number of degrees returned by
[`GeospatialPose.OrientationYawAccuracy`](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy).

Larger values indicate lower accuracy. For example, if the estimated yaw angle is 60 degrees and the yaw accuracy is 10 degrees, then there is a 68% probability that the true yaw angle is between 50 and 70 degrees.

## What's next

- [Place a Geospatial anchor](https://developers.google.com/ar/develop/unity-arf/geospatial/anchors#wgs84_anchors) by obtaining the anchor's Geospatial pose.