# XRGeospatialPose

Represents a position and orientation relative to the Earth.

Coordinates are relative to the WGS84 Ellipsoid

.

## Summary

### Inheritance

Inherits from: `IEquatable< XRGeospatialPose >`

| ### Constructors and Destructors ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#xrgeospatialpose(Quaternion rotation, double latitude, double longitude, double altitude)` Constructs a geospatial pose with data. ||
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#xrgeospatialpose(double latitude, double longitude)` Constructs a geospatial pose from coordinates with 0 altitude. ||
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#xrgeospatialpose(LocationInfo locationInfo)` Constructs a geospatial pose from location info. ||

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#altitude` | `double` The altitude in meters. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#iscoordinatevalid => Latitude >= -90D && Latitude <= 90D && Longitude >= -180D && Longitude <= 180D` | `bool` Gets a value indicating whether the geospatial pose has a valid coordinate. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#latitude` | `double` The latitude in degrees, between -90 and +90. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#longitude` | `double` The longitude in degrees, between -180 and 180. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#rotation` | `Quaternion` The orientation with respect to a coordinate system where +X=East, +Y=Up and +Z=South. |

| ### Public functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#equals(https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#structGoogle_1_1XR_1_1Extensions_1_1XRGeospatialPose other)` | `bool` |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#tostring(string format)` | `string` Gets a formatted string. |
| `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#tostring()` | `override string` |

## Public attributes

### Altitude

```c#
double Google::XR::Extensions::XRGeospatialPose::Altitude
```
The altitude in meters.

### IsCoordinateValid

```c#
bool Google::XR::Extensions::XRGeospatialPose::IsCoordinateValid =>
            Latitude >= -90D && Latitude <= 90D &&
            Longitude >= -180D && Longitude <= 180D
```
Gets a value indicating whether the geospatial pose has a valid coordinate.

Used to avoid [XrResultAndroid.GeospatialCoordinateInvalid](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrresultandroid_geospatialcoordinateinvalid) failure.


| Details ||
|---|---|
| **Returns** | True if it's valid. |

### Latitude

```c#
double Google::XR::Extensions::XRGeospatialPose::Latitude
```
The latitude in degrees, between -90 and +90.

### Longitude

```c#
double Google::XR::Extensions::XRGeospatialPose::Longitude
```
The longitude in degrees, between -180 and 180.

### Rotation

```c#
Quaternion Google::XR::Extensions::XRGeospatialPose::Rotation
```
The orientation with respect to a coordinate system where +X=East, +Y=Up and +Z=South.

Note: this coordinate system depends upon the precise position.

## Public functions

### Equals

```c#
bool Google::XR::Extensions::XRGeospatialPose::Equals(
  XRGeospatialPose other
)
```

### ToString

```c#
string Google::XR::Extensions::XRGeospatialPose::ToString(
  string format
)
```
Gets a formatted string.


Details Parameters `format` The format of floating point numbers. **Returns** The formatted string.

### ToString

```c#
override string Google::XR::Extensions::XRGeospatialPose::ToString()
```

### XRGeospatialPose

```c#
 Google::XR::Extensions::XRGeospatialPose::XRGeospatialPose(
  Quaternion rotation,
  double latitude,
  double longitude,
  double altitude
)
```
Constructs a geospatial pose with data.


Details Parameters `rotation` The orientation of the pose. `latitude` The latitude in degrees. `longitude` The longitude in degrees. `altitude` The altitude in meters.

### XRGeospatialPose

```c#
 Google::XR::Extensions::XRGeospatialPose::XRGeospatialPose(
  double latitude,
  double longitude
)
```
Constructs a geospatial pose from coordinates with 0 altitude.


Details Parameters `latitude` The latitude in degrees. `longitude` The longitude in degrees.

### XRGeospatialPose

```c#
 Google::XR::Extensions::XRGeospatialPose::XRGeospatialPose(
  LocationInfo locationInfo
)
```
Constructs a geospatial pose from location info.


Details Parameters `locationInfo` The LocationInfo with GPS data.