User Manual
Version 7.6
×

Distance

 
Example:
https://<address>/api/api.php?cmd=distance
 
Request:
https://<address>/api/api.php?cmd=distance&imei=7157153151020&start=1676926800&stop=1677013200
 
Answer:
{"code":0,"msg":"OK","distance":{"duration":48513,"length":637,3039,"parking_time":11548,"parking_count":11,"max_speed": 96, "avg_speed":66,"trips_cnt":1,"trips_ts":1676964676,"trips_te":1677013189,"parking":[{"agent_id":36830,"ts":1676964691,"te":1676965159, "lat":"59.807117","length":"30.16806","length":"0.055916477"},{"agent_id":36830,"ts":1676965990,"te":1676966589,"latitude":"59.808876 ", "length": "30.167131", "length": "6.7342625"}, {"agent_id": 36830, "ts": 1676972349, "te": 1676972775, "latitude": "59.41441","length": "31.110163","length":"80.29516"},{"agent_id":36830,"ts":1676972794,"te":1676973110,"latitude":"59.41053","length" :"31.117523","length ":"0.5588868"},{"agent_id":36830,"ts":1676973960,"te":1676974707,"lat":"59.319588","lon":"31.286898"," length":"13.742414"} ,{"agent_id":36830,"ts":1676976283,"te":1676978879,"latitude":"59.12122","length":"31.636242","length":"30.018213" },{"agent_id": 36830,"ts":1676983429,"te":1676985826,"latitude":"58.42442","longitude":"31.8248","length":"90.72026"},{"ag ent_id":36830,"ts":1676993840,"te":1676994327,"lat":"57.76241","lon":"33.949684","length":"150.61699"},{ "agent_id": 36830, " ts": 1676996180, "te": 1676996572, "lat": "57.61509", "lon": "34.47775", "length": "35.659954"}, {"agent_id": 36830, "ts": 1676996794, " te": 1676997167, "latitude": "57.61127", "length": "34.48724", "length": "0.95129204"}, {"agent_id": 36830, "ts": 1676997658, " te": 1677000405, "lat": "57.598377", "long": "34.519314", "length": "2.1072783"}], "tracks": [], "trips_time":48513,"trips_driving":36965, "startlat":"59.806779","startlon":"30.167737","stoplat":"56.258973","stoplon":"36.862156"}}
 
length is the actual mileage
duration - the duration of the run from the start of the first trip to the end of the last one
trips_te - start time of the first trip
trips_te - last trip end time
trips_cnt - number of trips
trips_driving - time in seconds when the car was driving (did not stop)
trips_time - total trip time
max_speed - maximum speed
avg_speed - average speed
parking_count - number of parking lots
parking_time - parking time
parkings - parking lots (for each start and end time)