aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-29 20:32:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-29 20:32:10 +1200
commit3f8c59f633f430e477d27301f2358499906fb21a (patch)
treee5fae28b1c9ff5f6c1bc1de8170036652be7684f /src/org/traccar/protocol
parent6223aaf9c397ffa930fddbd7b5e42fc6c94ad63d (diff)
downloadtrackermap-server-3f8c59f633f430e477d27301f2358499906fb21a.tar.gz
trackermap-server-3f8c59f633f430e477d27301f2358499906fb21a.tar.bz2
trackermap-server-3f8c59f633f430e477d27301f2358499906fb21a.zip
Fix GPS103 decoder (fix #371)
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 845aa9a8b..cd6dbdcd0 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -33,9 +33,6 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
super(serverManager);
}
- /**
- * Regular expressions pattern
- */
static private Pattern pattern = Pattern.compile(
"imei:" +
"(\\d+)," + // IMEI
@@ -46,9 +43,9 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
"[FL]," + // F - full / L - low
"(\\d{2})(\\d{2})(\\d{2})\\.(\\d{3})," + // Time UTC (HHMMSS.SSS)
"([AV])," + // Validity
- "(\\d{2})(\\d{2}\\.\\d{4})," + // Latitude (DDMM.MMMM)
+ "(\\d+)(\\d{2}\\.\\d+)," + // Latitude (DDMM.MMMM)
"([NS])," +
- "(\\d{3})(\\d{2}\\.\\d{4})," + // Longitude (DDDMM.MMMM)
+ "(\\d+)(\\d{2}\\.\\d+)," + // Longitude (DDDMM.MMMM)
"([EW])?," +
"(\\d+\\.?\\d*)," + // Speed
"(\\d+\\.\\d+)?" + // Course
@@ -80,7 +77,6 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
// Parse message
Matcher parser = pattern.matcher(sentence);
if (!parser.matches()) {
- Log.info("Parsing error");
return null;
}