diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-06-18 22:16:06 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-06-18 22:16:06 +1200 |
commit | 62379352b9f8f76ea4d72124af89d64c2e809a1c (patch) | |
tree | 093b050ba7f94d60891889ab980be5b3cd96067a | |
parent | 627aaff1b036a5a7b3dbc204726ba9f446beb1d3 (diff) | |
download | trackermap-server-62379352b9f8f76ea4d72124af89d64c2e809a1c.tar.gz trackermap-server-62379352b9f8f76ea4d72124af89d64c2e809a1c.tar.bz2 trackermap-server-62379352b9f8f76ea4d72124af89d64c2e809a1c.zip |
Fix ST210 decoder (fix #310)
-rw-r--r-- | src/org/traccar/protocol/St210ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/St210ProtocolDecoderTest.java | 6 |
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")); + } } |