aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-13 00:21:31 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-08-13 00:21:31 -0700
commitbdc4c6147d7fe9785d6b3c9290c69665f36202af (patch)
tree0cb3c0874e3aa8987e4f3453a1843876816f4446 /src
parent7c31297adb38d13e88e41e06d32663043c8ec363 (diff)
downloadtrackermap-server-bdc4c6147d7fe9785d6b3c9290c69665f36202af.tar.gz
trackermap-server-bdc4c6147d7fe9785d6b3c9290c69665f36202af.tar.bz2
trackermap-server-bdc4c6147d7fe9785d6b3c9290c69665f36202af.zip
Support Farnear protocol
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/GotopProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/GotopProtocolDecoder.java b/src/main/java/org/traccar/protocol/GotopProtocolDecoder.java
index 2ef975fe5..a867451aa 100644
--- a/src/main/java/org/traccar/protocol/GotopProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/GotopProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2013 - 2019 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ public class GotopProtocolDecoder extends BaseProtocolDecoder {
.number("DATE:(dd)(dd)(dd),") // date (yyddmm)
.number("TIME:(dd)(dd)(dd),") // time (hhmmss)
.number("LAT:(d+.d+)([NS]),") // latitude
- .number("LOT:(d+.d+)([EW]),") // longitude
+ .number("LO[NT]:(d+.d+)([EW]),") // longitude
.text("Speed:").number("(d+.d+),") // speed
.expression("([^,]+),") // status
.number("(d+)?") // course
diff --git a/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
index ca3ddfda8..23762f572 100644
--- a/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
@@ -17,6 +17,9 @@ public class GotopProtocolDecoderTest extends ProtocolTest {
"353327020412763,CMD-X"));
verifyPosition(decoder, text(
+ "867688038677542,ALM-D1,V,DATE:190709,TIME:185214,LAT:50.0422838N,LON:014.4504646E,Speed:004.3,081-20,05.68"));
+
+ verifyPosition(decoder, text(
"013226009991924,CMD-T,A,DATE:130802,TIME:153721,LAT:25.9757433S,LOT:028.1087816E,Speed:000.0,X-X-X-X-81-26,000,65501-00A0-4B8E"));
verifyPosition(decoder, text(