totalDistance becomes lesser then previous and trip distance become negative

Kyaw5 years ago

Since we are receiving negative distance in trip report (similar issue). The device does not send odometer value.

mysql> select * from tc_positions where deviceid = 1007 and id >= 298596186 order by fixtime asc limit 4;
+-----------+----------+----------+---------------------+---------------------+---------------------+-------+--------------------+-------------------+----------+---------+--------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------+
| id        | protocol | deviceid | servertime          | devicetime          | fixtime             | valid | latitude           | longitude         | altitude | speed   | course | address                                                                 | attributes                                                                                | accuracy | network                                                                                                                                      |
+-----------+----------+----------+---------------------+---------------------+---------------------+-------+--------------------+-------------------+----------+---------+--------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------+
| 298596186 | gt06     |     1007 | 2019-06-30 16:19:23 | 2019-06-30 14:58:29 | 2019-06-30 14:58:29 |      | 21.810827222222223 | 96.06319944444445 |        0 | 46.4363 |    337 | 1, စဥ့်ကိုင်, မန္တလေးတိုင်း                                             | {"sat":9,"distance":19161.52,"totalDistance":2.410041902E7,"motion":true,"ignition":true} |        0 | {"radioType":"gsm","considerIp":false,"cellTowers":[{"cellId":14972,"locationAreaCode":5061,"mobileCountryCode":414,"mobileNetworkCode":6}]} |
| 298596210 | gt06     |     1007 | 2019-06-30 16:19:33 | 2019-06-30 14:58:39 | 2019-06-30 14:58:39 |      | 21.812838333333335 | 96.06229111111111 |        0 | 48.5961 |    338 | 1, စဥ့်ကိုင်, မန္တလေးတိုင်း                                             | {"sat":9,"distance":18946.54,"totalDistance":2.410020404E7,"motion":true,"ignition":true} |        0 | {"radioType":"gsm","considerIp":false,"cellTowers":[{"cellId":14972,"locationAreaCode":5061,"mobileCountryCode":414,"mobileNetworkCode":6}]} |
| 298596233 | gt06     |     1007 | 2019-06-30 16:19:43 | 2019-06-30 14:58:49 | 2019-06-30 14:58:49 |      | 21.814920555555556 | 96.06136611111111 |        0 | 46.9763 |    337 | 1, စဥ့်ကိုင်, မန္တလေးတိုင်း                                             | {"sat":9,"distance":18724.51,"totalDistance":2.409998201E7,"motion":true,"ignition":true} |        0 | {"radioType":"gsm","considerIp":false,"cellTowers":[{"cellId":14971,"locationAreaCode":5061,"mobileCountryCode":414,"mobileNetworkCode":6}]} |
| 298596264 | gt06     |     1007 | 2019-06-30 16:19:53 | 2019-06-30 14:58:59 | 2019-06-30 14:58:59 |      | 21.817007222222223 | 96.06078888888888 |        0 | 44.8164 |    355 | 1, စဥ့်ကိုင်, မန္တလေးတိုင်း                                             | {"sat":9,"distance":18499.12,"totalDistance":2.409975662E7,"motion":true,"ignition":true} |        0 | {"radioType":"gsm","considerIp":false,"cellTowers":[{"cellId":14971,"locationAreaCode":5061,"mobileCountryCode":414,"mobileNetworkCode":6}]} |
+-----------+----------+----------+---------------------+---------------------+---------------------+-------+--------------------+-------------------+----------+---------+--------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------+

How could totalDistance becomes lesser then previous one? Is there anyway to fix?

Traccar version 4.2.
Protocol: GT06 (protocol document available via email)

Anton Tananaev5 years ago

Wrong message order from device.