diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-27 21:41:27 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-27 21:41:27 +1200 |
commit | 47f7837e086b3d664ea0ad0f45b2d1d35e5ba301 (patch) | |
tree | 1387e6d943270f0805a3ff73a2ce974d0f3c6f28 | |
parent | 68ec6c08336f29545f1d02b26b2a014a0cefb9d9 (diff) | |
download | trackermap-server-47f7837e086b3d664ea0ad0f45b2d1d35e5ba301.tar.gz trackermap-server-47f7837e086b3d664ea0ad0f45b2d1d35e5ba301.tar.bz2 trackermap-server-47f7837e086b3d664ea0ad0f45b2d1d35e5ba301.zip |
Fix GPS103 decoder (fix #723)
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gps103ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index eac393303..72be07bb6 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -41,7 +41,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { "(\\d{2}):?(\\d{2})(?:\\d{2})?," + // Local Time "[^,]*," + "[FL]," + // F - full / L - low - "(\\d{2})(\\d{2})(\\d{2})\\.(\\d{3})," + // Time UTC (HHMMSS.SSS) + "(\\d{2})(\\d{2})(\\d{2})\\.(\\d+)," + // Time UTC (HHMMSS.SSS) "([AV])," + // Validity "(\\d+)(\\d{2}\\.\\d+)," + // Latitude (DDMM.MMMM) "([NS])," + diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index b5365f8d7..c536c58f9 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -104,6 +104,9 @@ public class Gps103ProtocolDecoderTest { verify(decoder.decode(null, null, "imei:313009071131684,tracker,1403211928,,F,112817.000,A,0610.1133,N,00116.5840,E,0.00,,,0,0,0.0,0.0,")); + + verify(decoder.decode(null, null, + "imei:866989771979791,tracker,140527055653,,F,215653.00,A,5050.33113,N,00336.98783,E,0.066,0")); } |