aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-05-28 06:55:00 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-05-28 06:55:00 -0700
commit7d07898c52ab0442c78b4d068bf0b3922adc4a70 (patch)
treef7f273b3ea3f91e3730f60ee9c794c3277012362
parent5a35cad42efb1298ff679acf80cbbce169cc4646 (diff)
downloadtrackermap-server-7d07898c52ab0442c78b4d068bf0b3922adc4a70.tar.gz
trackermap-server-7d07898c52ab0442c78b4d068bf0b3922adc4a70.tar.bz2
trackermap-server-7d07898c52ab0442c78b4d068bf0b3922adc4a70.zip
Fix cell decoding
-rw-r--r--src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
index 534937235..60916e4ca 100644
--- a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
@@ -66,8 +66,8 @@ public class MictrackProtocolDecoder extends BaseProtocolDecoder {
int length = values.length % 5 == 0 ? 5 : 4;
for (int i = 0; i < values.length / length; i++) {
int mnc = Integer.parseInt(values[i * length]);
- int lac = Integer.parseInt(values[i * length + 1]);
- int cid = Integer.parseInt(values[i * length + 2]);
+ int cid = Integer.parseInt(values[i * length + 1]);
+ int lac = Integer.parseInt(values[i * length + 2]);
int mcc = Integer.parseInt(values[i * length + 3]);
network.addCellTower(CellTower.from(mcc, mnc, lac, cid));
}
diff --git a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
index bbdb05071..794b2b57e 100644
--- a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
@@ -21,13 +21,13 @@ public class MictrackProtocolDecoderTest extends ProtocolTest {
"MT;1;866425031379169;R2;181129081017+0,21681,20616,460+4+3976+0"));
verifyAttributes(decoder, text(
- "MT;1;866425031379169;R3;181129081017+0,1030,168267587,460,406+4+3976+0"));
+ "MT;1;866425031379169;R3;181129081017+0,167910723,14924,460,176+4+3976+0"));
verifyAttributes(decoder, text(
"MT;6;866425031377981;R12;190108024848+6a:db:54:5a:79:6d,-91,00:9a:cd:a2:e6:21,-94+0,21681,20616,460+3+3831+0"));
verifyAttributes(decoder, text(
- "MT;6;866425031377981;R13;190108024848+6a:db:54:5a:79:6d,-91,00:9a:cd:a2:e6:21,-94+0,1030,168267587,460,406+3+3831+0"));
+ "MT;6;866425031377981;R13;190108024848+6a:db:54:5a:79:6d,-91,00:9a:cd:a2:e6:21,-94+0,167910723,14924,460,176+3+3831+0"));
verifyAttributes(decoder, text(
"MT;5;866425031379169;RH;5+190116112648+0+0+0+0+11+3954+1"));