OS1 Services
Movement Tracking System

MTS Snapped Distance

3min

MTS Snapped Distance

With the GetSnappedDistance API, you can easily obtain the distance covered by a device during specific time intervals. This feature enables you to precisely calculate the distance traveled, which can be useful for determining driver payouts or more accurately measuring fuel usage.

Request Parameters

Parameter

Description

deviceId

The ID of the device to retrieve distance for.

app

Your appId provided after registration.

startTime

The start time of the period to calculate distance over (ISO 8601 format). Limits: This timestamp cannot be older than 2 days from current time.

endTime

The end time of the period to calculate distance over (ISO 8601 format).

Response Details

Field

Description

totalTraces

The total number of trace points for the device in the specified time period.

rsOutput

Output from the RouteStats snapped distance algorithm.

confidence

The confidence level of the calculated distance. Possible values are high, medium, medium_1, medium_2, medium_3, or low.

distance

The snapped distance traveled by the device in meters, calculated by RouteStats.



Example Response

Get Snapped Distance


The response shows a snapped distance of 37.4 km calculated with high confidence. The totalTraces indicates there were 250 location traces analyzed to calculate the distance.