diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-03-09 01:48:53 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-03-09 01:48:53 +1300 |
commit | c2ed376ea2bac8d2e6ac0ffb75be9e60f98fe92b (patch) | |
tree | 1bfdd85b6c70cd7dd1aa40c6a60b9774efac793a | |
parent | b4c411a95fb4432efe5aef26444f0699e43e90dc (diff) | |
download | trackermap-server-c2ed376ea2bac8d2e6ac0ffb75be9e60f98fe92b.tar.gz trackermap-server-c2ed376ea2bac8d2e6ac0ffb75be9e60f98fe92b.tar.bz2 trackermap-server-c2ed376ea2bac8d2e6ac0ffb75be9e60f98fe92b.zip |
Fix ST600R cell decoding
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/SuntechProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java index 034894b52..b739e699b 100644 --- a/src/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java @@ -192,7 +192,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { if (protocol.equals("ST600")) { position.setNetwork(new Network(CellTower.from( Integer.parseInt(values[index++]), Integer.parseInt(values[index++]), - Integer.parseInt(values[index++]), cid, Integer.parseInt(values[index++])))); + Integer.parseInt(values[index++], 16), cid, Integer.parseInt(values[index++])))); } } diff --git a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java index bcc8a8b8b..bbcead2d0 100644 --- a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java @@ -28,6 +28,9 @@ public class SuntechProtocolDecoderTest extends ProtocolTest { SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(new SuntechProtocol()); verifyPosition(decoder, text( + "ST600STT;008084783;20;419;20180308;18:00:36;0032cc3e;736;3;445c;41;-16.530023;-068.084267;018.640;267.99;10;1;11655;13.33;100000;2;0336;000061;4.5;0;0.00")); + + verifyPosition(decoder, text( "ST600STT;107850496;20;419;20180227;14:30:45;00462b08;736;3;4524;50;-16.479091;-068.119119;000.346;000.00;4;1;0;13.89;000000;1;0223;000003;0.0;0;0.00")); verifyPosition(decoder, text( |