aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/St210ProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/St210ProtocolDecoderTest.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/St210ProtocolDecoder.java b/src/org/traccar/protocol/St210ProtocolDecoder.java
index 5e1ac1bf6..432c9c1fa 100644
--- a/src/org/traccar/protocol/St210ProtocolDecoder.java
+++ b/src/org/traccar/protocol/St210ProtocolDecoder.java
@@ -33,8 +33,8 @@ public class St210ProtocolDecoder extends BaseProtocolDecoder {
DATE("(\\d+);","GPS date (yyyymmdd) Year + Month + Day"),
TIME("(\\d{2}:\\d{2}:\\d{2});","GPS time (hh:mm:ss) Hour : Minute : Second"),
CELL("(\\w+);","Location Code ID (3 digits hex) + Serving Cell BSIC(2 digits decimal)"),
- LAT("(-\\d{2}.\\d+);", "Latitude (+/-xx.xxxxxx)"),
- LON("(-\\d{3}.\\d+);", "Longitude (+/-xxx.xxxxxx)"),
+ LAT("([-\\+]\\d{2}.\\d+);", "Latitude (+/-xx.xxxxxx)"),
+ LON("([-\\+]\\d{3}.\\d+);", "Longitude (+/-xxx.xxxxxx)"),
SPD("(\\d{3}.\\d{3});","Speed in km/h - This value returns to 0 when it is over than 200,000Km"),
CRS("(\\d{3}.\\d{2});", "Course over ground in degree"),
SATT("(\\d+);", "Number of satellites"),
diff --git a/test/org/traccar/protocol/St210ProtocolDecoderTest.java b/test/org/traccar/protocol/St210ProtocolDecoderTest.java
index d49976021..26820b3f7 100644
--- a/test/org/traccar/protocol/St210ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/St210ProtocolDecoderTest.java
@@ -48,6 +48,12 @@ public class St210ProtocolDecoderTest {
.decode(null,
null,
"SA200ALT;317652;042;20120829;14:25:58;16d41;-15.618770;-056.083242;000.029;000.00;0;0;2404240;0.00;000000;10"));
+
+ assertNotNull(decoder
+ .decode(null,
+ null,
+ "SA200STT;430070;133;20130615;22:22:32;151347;+02.860514;-060.653351;000.003;000.00;12;1;0;12.39;000000;1;0208"));
+
}
}