aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-11-29 10:38:22 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-11-29 10:38:22 +1300
commitd9f6849507ed1dfab395d0ad6f3d058eed319d33 (patch)
tree4c02bdf0e995e16e48fac504424fce995417a87c
parent2f41a4d95b5be4804b32cac6d96c1b152d53d7ec (diff)
downloadtrackermap-server-d9f6849507ed1dfab395d0ad6f3d058eed319d33.tar.gz
trackermap-server-d9f6849507ed1dfab395d0ad6f3d058eed319d33.tar.bz2
trackermap-server-d9f6849507ed1dfab395d0ad6f3d058eed319d33.zip
Change PT60 coordinates order
-rw-r--r--src/org/traccar/protocol/Pt60ProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/Pt60ProtocolDecoderTest.java7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Pt60ProtocolDecoder.java b/src/org/traccar/protocol/Pt60ProtocolDecoder.java
index 636d9e27e..75b33b3c7 100644
--- a/src/org/traccar/protocol/Pt60ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt60ProtocolDecoder.java
@@ -146,8 +146,8 @@ public class Pt60ProtocolDecoder extends BaseProtocolDecoder {
position.setValid(true);
position.setFixTime(position.getDeviceTime());
- position.setLongitude(Double.parseDouble(values[0]));
- position.setLatitude(Double.parseDouble(values[1]));
+ position.setLatitude(Double.parseDouble(values[0]));
+ position.setLongitude(Double.parseDouble(values[1]));
return position;
diff --git a/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
index 4bd9ec27d..f41ff90e6 100644
--- a/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class Pt60ProtocolDecoderTest extends ProtocolTest {
Pt60ProtocolDecoder decoder = new Pt60ProtocolDecoder(null);
+ verifyPosition(decoder, text(
+ "@B#@|01|001|864891030184852|9425010450971470|1|45|20181127122717|32.701093|35.570938|1|@E#@"));
+
verifyNull(decoder, text(
"@B#@|01|003|864891030184954|9425010450971470|S6_EN_A_V1.3.7|0|66|20181122113251|40412,10461,1,425,18|49382,10461,1,425,9|40411,10461,1,425,7|2|"));
@@ -17,10 +20,10 @@ public class Pt60ProtocolDecoderTest extends ProtocolTest {
"@B#@|01|033|864891030184954|9425010450971470|0|4|20181120151744|"));
verifyPosition(decoder, text(
- "@B#@|01|001|111112222233333|8888888888888888|1|55|20160715150323|125.48276|37.615124|111.059279|49.346383|1|"));
+ "@B#@|01|001|111112222233333|8888888888888888|1|55|20160715150323|37.615124|125.48276|111.059279|49.346383|1|"));
verifyPosition(decoder, text(
- "@B#@|01|001|111112222233333|8888888888888888|1|55|20160715150323|125.48276|37.615124|1|"));
+ "@B#@|01|001|111112222233333|8888888888888888|1|55|20160715150323|37.615124|125.48276|1|"));
verifyAttributes(decoder, text(
"@G#@,V01,14,357653051059785,9404223001501310,20180419165604,101,26,"));