calculate trip from data

opengrace 9 years ago

Hello

how to know start trip and end trip,
from database or log.

regards

Anton Tananaev 9 years ago

Traccar uses speed value and time to calculate trips, but that's just one of many possible options.

opengrace 9 years ago
{
   "index": 1088,
   "protocol": "gt06",
   "speed": "8.099355000000001",
   "mcc": 510,
   "altitude": "0.0",
   "ignition": true,
   "server_time": "08-05-2017 08:21:21",
   "cid": 16246,
   "device_time": "08-05-2017 08:21:17",
   "lac": 1522,
   "ip": "114.127.245.9",
   "id": "351608083105788",
   "course": "190.0",
   "distance": 388.43,
   "sat": 9,
   "name": "alex",
   "totalDistance": 21302652.23,
   "longitude": "106.81798222222223",
   "mnc": 10,
   "latitude": "-6.154154999999999",
   "group": "indonesian@lacak.co",
   "fix_time": "08-05-2017 08:21:17"
}

is this valid to count ?
because traccar not use this for trip report.

Anton Tananaev 9 years ago

I don't understand what it is or the question is.

opengrace 9 years ago

sorry, please ignore above data

can you help investigate this data

{
   "protocol":"gt06",
   "index":"1087",
   "mcc":"510",
   "speed":"19.438452",
   "altitude":"0.0",
   "ignition":"true",
   "server_time":"08-05-2017 08:21:21",
   "cid":"16246",
   "lac":"1522",
   "device_time":"08-05-2017 08:21:10",
   "ip":"114.127.245.9",
   "course":"165.0",
   "id":"351608083105788",
   "distance":"336.1",
   "sat":"10",
   "totalDistance":"21302599.9",
   "name":"alex",
   "mnc":"10",
   "longitude":"106.81782222222222",
   "latitude":"-6.153709444444444",
   "group":"indonesian@lacak.co",
   "fix_time":"08-05-2017 08:21:10"
},
{
   "protocol":"gt06",
   "index":"1088",
   "mcc":"510",
   "speed":"8.099355000000001",
   "altitude":"0.0",
   "ignition":"true",
   "server_time":"08-05-2017 08:21:21",
   "cid":"16246",
   "lac":"1522",
   "device_time":"08-05-2017 08:21:17",
   "ip":"114.127.245.9",
   "course":"190.0",
   "id":"351608083105788",
   "distance":"388.43",
   "sat":"9",
   "totalDistance":"21302652.23",
   "name":"alex",
   "mnc":"10",
   "longitude":"106.81798222222223",
   "latitude":"-6.154154999999999",
   "group":"indonesian@lacak.co",
   "fix_time":"08-05-2017 08:21:17"
},

About distance, how can between 7 second different gap 388.43meters with low speed ?

opengrace 9 years ago

distance is gap between point to last point in meters ..
is it correct ?

opengrace 9 years ago

“totalDistance”:”21302652.23″ - “totalDistance”:”21302599.9″ = 52.33 meters

“distance”:”388.43″ & “distance”:”336.1″ .. ???

how to calculate total mileage ?

Anton Tananaev 9 years ago

Distance is a distance from "last" location. Total distance is a sum of all distances.

There can be problems with calculation when device sends multiple reports at the same time, which seems to be the case.