Track data
This API loads detailed route points (track data) for a trip previously obtained via the rungeo method. Each track point contains coordinates, speed, and its absolute recording time as a Unix timestamp.
How to get data
Method
GET
Request address
To get the data, use the address: https://<server_address>/api/api.php?
Request parameters
-
cmd=gettrack — command to retrieve the track
-
id — track ID obtained from the rungeo API response
-
node — node number where the command should be executed
Example request
https://<server_address>/api/api.php?cmd=gettrack&id=70685695&node=1
|
Response
{
"track_data": "47.2037;39.6325;10;1439443509:47.2037;39.6324;13;1439443510:47.2037;39.6323;15;1439443512:47.2036;39.6304;22;1439443568",
"track_id": 70685695,
"unixstarttimestamp": 1439443509
}
|
The API response contains:
-
track_id— the unique track identifier;
-
unixstarttimestamp— the track start date and time as a Unix timestamp;
-
track_data— a sequence of track points separated by colons (:).
Each track point contains four values separated by semicolons (;):
1. latitude — latitude;
2. longitude — longitude;
3. speed_kmh — speed in km/h;
4. point_unix_timestamp — the absolute time when the point was recorded, as a Unix timestamp in UTC.
Track point format:
latitude;longitude;speed_kmh;point_unix_timestamp
|
Example:
47.2037;39.6325;10;1439443509
|
The value 1439443509 is the absolute time when the point was recorded, not the number of seconds from the beginning of the track.
To calculate the time elapsed since the beginning of the track, use the following formula: elapsed_seconds = point_unix_timestamp - unixstarttimestamp. Example: 1439443568 - 1439443509 = 59