# Location

The result from Geolocation operations will return a `Location` object, which looks like this:

```kotlin
class Location(
    public val coordinates: Coordinates,
    public val accuracy: Double,
    public val azimuth: Azimuth?,
    public val speed: Speed?,
    public val altitude: Altitude?,
    public val timestampMillis: Long,
)
```

You can read the [KDocs here](https://docs.compass.jordond.dev/compass-core/dev.jordond.compass/-location/index.html).

### Detailed location data

Depending on the `Priority` you use to request the location, determines what kind of data is present.

All location results will return the coordinates and the accuracy of those coordinates in meters. In order to get the other values you will need to use a more accurate `Priority`, like so:

```kotlin
val location: Location = geolocator.current(Priority.HighAccuracy)
```

There is still a chance those values will be `null`, since it is up to the device to determine what data is returned.

{% hint style="info" %}
On Android the `Priority.HighAccuracy` requires the `ACCESS_FINE_LOCATION` permission. This will be requested automatically by Compass.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://compass.jordond.dev/geolocation/location.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
