Distance Calculation is Extremely High

danny.chiang91 9 years ago

Hi Anton

we're forwarding tracking data from our server using Standard Wialon IPS Protocol
and we're getting this piece of data :

2017-05-16 14:09:52 DEBUG: [KafkaDataHandler] Handled position : latency = 4 ms , partition = 0 , offset = 42937203 , topic = lacaktraffictest , key = null , value = {"altitude":"0.0","server_time":"16-05-2017 14:09:52","distance":14802.32,"sat":7,"ip":"217.23.132.215","latitude":"-6.1776583333333335","master_group":"track@promogo.com","fix_time":"16-05-2017 14:09:39","speed":"17.818581000000002","output":"0","valid":"true","input":"0","protocol":"wialon","hostname":"ax3","name":"Driver 5","course":"139.0","id":"154299801199","adc1":"0.0","event":"2","totalDistance":465581.88,"adc2":"0.0","longitude":"106.79512","device_time":"16-05-2017 14:09:39","group":"panasonic@promogo.com"}
2017-05-16 14:09:54 DEBUG: [KafkaDataHandler] Handled position : latency = 2 ms , partition = 0 , offset = 42937225 , topic = lacaktraffictest , key = null , value = {"altitude":"0.0","server_time":"16-05-2017 14:09:53","distance":14689.89,"sat":7,"ip":"217.23.132.215","latitude":"-6.178446666666667","master_group":"track@promogo.com","fix_time":"16-05-2017 14:09:52","speed":"15.658753","output":"0","valid":"true","input":"0","protocol":"wialon","hostname":"ax3","name":"Driver 5","course":"141.0","id":"154299801199","adc1":"0.0","event":"2","totalDistance":465469.45,"adc2":"0.0","longitude":"106.79576","device_time":"16-05-2017 14:09:52","group":"panasonic@promogo.com"}

the coordinate is
-6.1776583333333335,106.79512
-6.178446666666667,106.79576

if i count it using coordinate calculator, distance should be 0.11 Kilometer

but in the data, it show 'distance:14689.89'

wonder if this bugs in traccar ?

btw, only several device id is having this kind of error

please help because we're stuck in this

Anton Tananaev 9 years ago

You have to compare "latest" position with the received one, not two consequent messages in the logs.