# GeospatialTester

Artifact: [androidx.xr.arcore:arcore-testing](https://developer.android.com/jetpack/androidx/releases/xr-arcore) [View Source](https://cs.android.com/search?q=file:androidx/xr/arcore/testing/GeospatialTester.kt+class:androidx.xr.arcore.testing.GeospatialTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

*** ** * ** ***


```
public final class GeospatialTester
```

<br />

*** ** * ** ***

Tests `https://developer.android.com/reference/androidx/xr/arcore/Geospatial` operations in unit tests.

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Double.html>` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getAllowedAnchorLatitudeRange()()` the acceptable range of latitude values that `https://developer.android.com/reference/androidx/xr/arcore/Geospatial` can use when creating Anchors, with a default of `-90..90` (inclusive) |
| `final https://developer.android.com/reference/androidx/xr/runtime/math/Pose` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedAnchorPose()()` the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` of the `https://developer.android.com/reference/androidx/xr/arcore/Anchor` that will be returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchor(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion)` or `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchorOnSurface(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion,androidx.xr.arcore.GeospatialSurface)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedGeospatialPose()()` the `https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final double` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedHorizontalAccuracy()()` the horizontal accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final double` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedOrientationYawAccuracy()()` the yaw accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedPose()()` the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createPoseFromGeospatialPose(androidx.xr.runtime.math.GeospatialPose)` |
| `final double` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedVerticalAccuracy()()` the vertical accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getExpectedVpsResult()()` `https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult` that will be returned when checking for VPS availability if not null |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#getState()()` the `https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState` device's Geospatial communication |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setAllowedAnchorLatitudeRange(android.util.Range)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Double.html> value)` the acceptable range of latitude values that `https://developer.android.com/reference/androidx/xr/arcore/Geospatial` can use when creating Anchors, with a default of `-90..90` (inclusive) |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedAnchorPose(androidx.xr.runtime.math.Pose)(https://developer.android.com/reference/androidx/xr/runtime/math/Pose value)` the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` of the `https://developer.android.com/reference/androidx/xr/arcore/Anchor` that will be returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchor(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion)` or `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchorOnSurface(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion,androidx.xr.arcore.GeospatialSurface)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedGeospatialPose(androidx.xr.runtime.math.GeospatialPose)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose value)` the `https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedHorizontalAccuracy(kotlin.Double)(double value)` the horizontal accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedOrientationYawAccuracy(kotlin.Double)(double value)` the yaw accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedPose(androidx.xr.runtime.math.Pose)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose value)` the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createPoseFromGeospatialPose(androidx.xr.runtime.math.GeospatialPose)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedVerticalAccuracy(kotlin.Double)(double value)` the vertical accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)` |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setExpectedVpsResult(androidx.xr.arcore.VpsAvailabilityResult)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult value)` `https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult` that will be returned when checking for VPS availability if not null |
| `final void` | `https://developer.android.com/reference/androidx/xr/arcore/testing/GeospatialTester#setState(androidx.xr.arcore.Geospatial.GeospatialTrackingState)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState value)` the `https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState` device's Geospatial communication |

## Public methods

### getAllowedAnchorLatitudeRange

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final @NonNull Range<@NonNull Double> getAllowedAnchorLatitudeRange()
```

the acceptable range of latitude values that `https://developer.android.com/reference/androidx/xr/arcore/Geospatial` can use when creating Anchors, with a default of `-90..90` (inclusive)

### getExpectedAnchorPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final Pose getExpectedAnchorPose()
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` of the `https://developer.android.com/reference/androidx/xr/arcore/Anchor` that will be returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchor(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion)` or `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchorOnSurface(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion,androidx.xr.arcore.GeospatialSurface)`

### getExpectedGeospatialPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final @NonNull GeospatialPose getExpectedGeospatialPose()
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### getExpectedHorizontalAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final double getExpectedHorizontalAccuracy()
```

the horizontal accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### getExpectedOrientationYawAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final double getExpectedOrientationYawAccuracy()
```

the yaw accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### getExpectedPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final @NonNull Pose getExpectedPose()
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createPoseFromGeospatialPose(androidx.xr.runtime.math.GeospatialPose)`

### getExpectedVerticalAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final double getExpectedVerticalAccuracy()
```

the vertical accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### getExpectedVpsResult

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final @NonNull VpsAvailabilityResult getExpectedVpsResult()
```

`https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult` that will be returned when checking for VPS availability if not null

### getState

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final @NonNull Geospatial.GeospatialTrackingState getState()
```

the `https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState` device's Geospatial communication

### setAllowedAnchorLatitudeRange

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setAllowedAnchorLatitudeRange(@NonNull Range<@NonNull Double> value)
```

the acceptable range of latitude values that `https://developer.android.com/reference/androidx/xr/arcore/Geospatial` can use when creating Anchors, with a default of `-90..90` (inclusive)

### setExpectedAnchorPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedAnchorPose(Pose value)
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` of the `https://developer.android.com/reference/androidx/xr/arcore/Anchor` that will be returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchor(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion)` or `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createAnchorOnSurface(kotlin.Double,kotlin.Double,kotlin.Double,androidx.xr.runtime.math.Quaternion,androidx.xr.arcore.GeospatialSurface)`

### setExpectedGeospatialPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedGeospatialPose(@NonNull GeospatialPose value)
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/GeospatialPose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### setExpectedHorizontalAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedHorizontalAccuracy(double value)
```

the horizontal accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### setExpectedOrientationYawAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedOrientationYawAccuracy(double value)
```

the yaw accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### setExpectedPose

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedPose(@NonNull Pose value)
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` that would be created by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createPoseFromGeospatialPose(androidx.xr.runtime.math.GeospatialPose)`

### setExpectedVerticalAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedVerticalAccuracy(double value)
```

the vertical accuracy of the value returned by `https://developer.android.com/reference/androidx/xr/arcore/Geospatial#createGeospatialPoseFromPose(androidx.xr.runtime.math.Pose)`

### setExpectedVpsResult

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setExpectedVpsResult(@NonNull VpsAvailabilityResult value)
```

`https://developer.android.com/reference/androidx/xr/arcore/VpsAvailabilityResult` that will be returned when checking for VPS availability if not null

### setState

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.0.0)

```
public final void setState(@NonNull Geospatial.GeospatialTrackingState value)
```

the `https://developer.android.com/reference/androidx/xr/arcore/Geospatial.GeospatialTrackingState` device's Geospatial communication