# GeospatialPose

Describes a specific location, elevation, and compass heading relative to Earth.

It is comprised of:

- Latitude and longitude are specified in degrees, with positive values being north of the equator and east of the prime meridian as defined by the [WGS84 specification](https://en.wikipedia.org/wiki/World_Geodetic_System).
- Altitude is specified in meters above the WGS84 ellipsoid, which is roughly equivalent to meters above sea level.
- Orientation is defined in the east-up-north coordinate frame where X+ points east, Y+ points up away from gravity, and Z+ points north.
- Accuracy of the latitude, longitude, altitude, and orientation are available as numeric confidence intervals where a large value (large interval) means low confidence and small value (small interval) means high confidence.

<br />

A [GeospatialPose](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#structGoogle_1_1XR_1_1ARCoreExtensions_1_1GeospatialPose) can be retrieved from `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose` and from converting a `Pose` using `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#convert`.

## Summary

| ### Public attributes ||
|---|---|
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#altitude` | `double` Altitude of the pose in meters above the WGS 84 ellipsoid. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation` | `https://docs.unity3d.com/ScriptReference/Quaternion.html` The rotation of the target with respect to the east-up-north coordinate frame where X+ points east, Y+ points up away from gravity, and Z+ points north. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#heading` | `double` **[Deprecated.](https://developers.google.com/ar/reference/unity-arf/deprecated/deprecated)** This function has been deprecated in favor of `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`, which provides orientation values in 3D space. To determine a value analogous to the heading value, calculate the yaw, pitch, and roll values from `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`. When the device is pointing downwards, i.e. perpendicular to the ground, heading is analoguous to roll, and when the device is upright in the device's default orientation mode, heading is analogous to yaw. Heading of the pose in degrees. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#headingaccuracy` | `double` **[Deprecated.](https://developers.google.com/ar/reference/unity-arf/deprecated/deprecated)** This function has deprecated in favor of `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy` which provides the accuracy analogous to the heading accuracy when the device is held upright in the default orientation mode. Estimated heading accuracy in degrees. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#horizontalaccuracy` | `double` Estimated horizontal accuracy in meters with respect to latitude and longitude. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#latitude` | `double` Latitude of the pose in degrees. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#longitude` | `double` Longitude of the pose in degrees. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy` | `double` Gets the pose's estimated orientation yaw angle accuracy. |
| `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#verticalaccuracy` | `double` Estimated vertical accuracy in meters. |

## Public attributes

### Altitude

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::Altitude
```
Altitude of the pose in meters above the WGS 84 ellipsoid.

### EunRotation

```c#
Quaternion Google::XR::ARCoreExtensions::GeospatialPose::EunRotation
```
The rotation of the target with respect to the east-up-north coordinate frame where X+ points east, Y+ points up away from gravity, and Z+ points north.

A rotation around the Y+ axis creates a rotation counterclockwise from north.

### Heading

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::Heading
```
Heading of the pose in degrees.

This is valid for a `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#structGoogle_1_1XR_1_1ARCoreExtensions_1_1GeospatialPose` retrieved from `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose`. and return 0 for all other `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#structGoogle_1_1XR_1_1ARCoreExtensions_1_1GeospatialPose` objects.

Heading is specified in degrees clockwise from true north and approximates the direction the device is facing. The value returned when facing north is 0°, when facing east is 90°, when facing south is +/-180°, and when facing west is -90°.

The heading approximation is based on the rotation of the device in its current orientation mode (i.e. portrait or landscape) and pitch. For example, when the device is held vertically or upright, the heading is based on the camera optical axis. If the device is held horizontally, looking downwards, the heading is based on the top of the device, with respect to the orientation mode.

Note: Heading is currently only supported in the device's default orientation mode, which is portrait mode for most supported devices.

**[Deprecated.](https://developers.google.com/ar/reference/unity-arf/deprecated/deprecated)** This function has been deprecated in favor of `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`, which provides orientation values in 3D space. To determine a value analogous to the heading value, calculate the yaw, pitch, and roll values from `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`. When the device is pointing downwards, i.e. perpendicular to the ground, heading is analoguous to roll, and when the device is upright in the device's default orientation mode, heading is analogous to yaw.

### HeadingAccuracy

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::HeadingAccuracy
```
Estimated heading accuracy in degrees.

This is valid for a [GeospatialPose](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#structGoogle_1_1XR_1_1ARCoreExtensions_1_1GeospatialPose) retrieved from `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose`. and return 0 for all other [GeospatialPose](https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#structGoogle_1_1XR_1_1ARCoreExtensions_1_1GeospatialPose) objects.

We define heading accuracy as the radius of the 68th percentile confidence level around `Heading`. In other words, there is a 68% probability that the true heading is within `HeadingAccuracy` of `Heading`. Larger values indicate lower accuracy.

For example, if the estimated heading is 60°, and the heading accuracy is 10°, then there is a 68% probability of the true heading being between 50° and 70°.

**[Deprecated.](https://developers.google.com/ar/reference/unity-arf/deprecated/deprecated)** This function has deprecated in favor of `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy` which provides the accuracy analogous to the heading accuracy when the device is held upright in the default orientation mode.

### HorizontalAccuracy

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::HorizontalAccuracy
```
Estimated horizontal accuracy in meters with respect to latitude and longitude.

We define horizontal accuracy as the radius of the 68th percentile confidence level around the estimated horizontal location. In other words, if you draw a circle centered at `Latitude` and `Longitude`, and with a radius equal to the horizontal accuracy, then there is a 68% probability that the true location is inside the circle. Larger numbers indicate lower accuracy.

For example, if the latitude is 10°, longitude is 10°, and the returned value is 15, then there is a 68% probability that the true location is within 15 meters of the (10°, 10°) latitude/longitude coordinate.

### Latitude

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::Latitude
```
Latitude of the pose in degrees.

Positive values are north of the equator as defined by the [WGS84 specification](https://en.wikipedia.org/wiki/World_Geodetic_System).

### Longitude

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::Longitude
```
Longitude of the pose in degrees.

Positive values are east of the prime meridian as defined by the [WGS84 specification](https://en.wikipedia.org/wiki/World_Geodetic_System).

### OrientationYawAccuracy

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::OrientationYawAccuracy
```
Gets the pose's estimated orientation yaw angle accuracy.

Yaw rotation is the angle between the pose's compass direction and north, and can be determined from `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`.

We define orientation yaw accuracy as the estimated radius of the 68th percentile confidence level around yaw angles from `https://developers.google.com/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation`. In other words, there is a 68% probability that the true yaw angle is within `OrientationYawAccuracy` degrees of this pose's rotation. Larger values indicate lower accuracy.

For example, if the estimated yaw angle is 60°, and the yaw accuracy is 10°, then there is a 68% probability of the true yaw angle being between 50° and 70°.

### VerticalAccuracy

```c#
double Google::XR::ARCoreExtensions::GeospatialPose::VerticalAccuracy
```
Estimated vertical accuracy in meters.

We define vertical accuracy as the radius of the 68th percentile confidence level around the estimated altitude. In other words, there is a 68% probability that the true altitude is within the output value (in meters) of this `Altitude` (above or below). Larger numbers indicate lower accuracy.

For example, if `Altitude` is 100 meters, and `VerticalAccuracy` is 20 meters, there is a 68% chance that the true altitude is within 20 meters of 100 meters.