LocationHistory
The LocationHistory type represents a historical location record for a tracker. It combines data from location reports and provides additional context such as nearest city information.
Fields
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier for the location history record |
timestamp | DateTime! | The timestamp when the location was recorded |
location | Coordinates! | The geographical coordinates of the location |
nearestCity | String | The nearest city to the location (if available) |
tracker | Tracker! | The tracker associated with this location |
confidence | Int | Confidence level of the location data (1-3, where 3 is highest) |
horizontalAccuracy | Float | Horizontal accuracy of the location in meters |
Example
{
locationHistoryByTracker(trackerId: "123") {
id
timestamp
location {
latitude
longitude
}
nearestCity
confidence
horizontalAccuracy
tracker {
id
name
}
}
}
Notes
-
The
confidencefield uses a scale of 1-3:- 1: Low confidence
- 2: Medium confidence
- 3: High confidence
-
The
horizontalAccuracyfield represents the accuracy radius in meters. Lower values indicate more precise location data. -
Location history records are filtered by default to only include medium to high confidence reports (confidence >= 2).
-
The
nearestCityfield is populated through an asynchronous geocoding process and may not be immediately available for new location records.