The same 'problem' occurs on the traccar demo server ( http://demo5.traccar.org/ ).
All of the GPS Positions are somehow shifted to (north) east. (~30 km airline)
Do you have protocol documentation?
The protocol documentation is available here: https://we.tl/t-jl2Zj0DoPF
I have found out what seems to be the probem:
In the TelicProtocolDecoder.java class this statement is used:
if (parser.hasNext(6)) {
position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN));
position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN));
}
When i have a look in the Parser class the following is done with the coordinates:
case DEG_MIN_MIN:
coordinate = nextInt(0);
coordinate += Double.parseDouble(next() + '.' + next()) / 60;
break;
I guess this is done because the telic tracker should send degrees and minutes splitted but it seems to be correct to just divede the values you are using for parsing with 100. Than the correct values are shown. So this gives me the correct values:
case DEG_MIN_MIN:
coordinate = nextInt(0);
coordinate += Double.parseDouble(next() + '.' + next()) / 100;
break;
Another example where the coordinates are decoded wrong:
2019-06-06 07:22:00 INFO: [45c5c62a: 5067 < 176.83.213.208] HEX: 303032363335333136313037323735323434307c3236327c30327c30303230303430323000
2019-06-06 07:22:01 INFO: [45c5c62a: 5067 < 176.83.213.208] HEX: 730000003030323133353331363130373237353234343039392c3036303631393037323230302c302c3036303631393037323135392c3030373336303034382c34393939393338302c332c34352c3130312c392c2c2c3437332c343539313631302c2c303030302c30302c302c3230322c302c3034313400
2019-06-06 07:22:01 INFO: [45c5c62a] id: 353161072752440, time: 2019-06-06 07:21:59, lat: 50.66563, lon: 7.60008, speed: 24.3, course: 101.0
Transformed HEX to ASCII is:
002135316107275244099,060619072200,0,060619072159,**007360048,49999380**,3,45,101,9,,,473,4591610,,0000,00,0,202,0,0414
The correct values for longitude and latitude should be:7.360048
and 49.999380
Traccar decodes it to:7.60008
and 50.66563
When i now take the figures after the dot and multiply it with sixty and divde it with 100 i get the correct values. In this example the figure in front of the dot is also wrong because in your calculation (divide with 60) you get a result which is greater than 1.
Looks like there are several different variations of the protocol. I need to know how to distinguish between two.
I asked Telic which devices use another protocol than the one which is avaible with the SBC_AVL or Picotrack. They say that every telic device is using the accuracy of 100μ° or 1μ°. It is possible to distinguish between them by the length of longitude and latitude:
Extended GPS position Mode
In standard mode the GPS position is transmitted in a accuracy of 100μ°. Therefore the latitude has a maximum string length of 7 characters and the longitude 6 characters.
If the extended mode is activated, the resolution is 1μ° and the latitude is always transmitted with a fix minimum string length of 8 and the longitude with a fix minimum string length of 9.
So the Server can detect the setting of GPS accuracy by checking the string length without the knowledge of this configuration in the device.
They say that there is no other protocol used by any of the Telic devices. It is possible to see which telic device is used in the HEX codes:
Current values when document was created:
SBC-AVL: Code = 0404, 0406, 0409
SBC-AVL Power: Code = 0405, 0407, 0410,
Updated decoder to work according to your quote.
Thank you! Can you give me an estimation when the next docker version including this commit will be available?
Unfortunately not.
When will it be decided when there will be the next update? We would like to fix the bug as soon as possible, but still use the Docker package. Is there any other way to fix the bug in our system as soon as possible?
Hi,
we are using the latest traccar docker image and have some GPS devices connected to it. I would like to add some telic devices ( Telic SBC-AVL and Picotrack Endurance Rechargeable) but the traccar server is showing me the wrong longitude and latitude. Other traccars from other manufactures are working without any problems.
I have configured the telic devices to port 5067 of my traccar server. I can see the messages in the traccar-log. I have manually decoded the HEX values which are coming from the telic devices and talked to telic about it. The problem seems to be the traccar server. One example:
Log entry:
Decoded HEX to ASCII is:
The telic sends the coordinates:
52.024458 and 8.531585 which are the correct coordinates. But the traccar server uses the coordinates lat: 52.04076, lon: 8.88598
Thanks for your help!