aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-10-23 22:34:53 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-10-23 22:34:53 +1300
commit1928609c0f6e6cd78a4788a7d3fe2f37f32ead33 (patch)
treeaa2847d3cbb9e60705be4d5c682c38b5fb9b8457 /src/org/traccar/protocol/H02ProtocolDecoder.java
parent30ebfa7d6b683fcec586233fa5c68a966c2841ad (diff)
downloadtrackermap-server-1928609c0f6e6cd78a4788a7d3fe2f37f32ead33.tar.gz
trackermap-server-1928609c0f6e6cd78a4788a7d3fe2f37f32ead33.tar.bz2
trackermap-server-1928609c0f6e6cd78a4788a7d3fe2f37f32ead33.zip
Improve H02 decoders
Diffstat (limited to 'src/org/traccar/protocol/H02ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 463c0af27..cc59eea9d 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -106,19 +106,19 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
return position;
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"\\*..," + // Manufacturer
"(\\d+)," + // IMEI
"V\\d," + // Version?
".*" +
"(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS)
"([AV])," + // Validity
- "(\\d+)(\\d{2}.\\d{4})," + // Latitude (DDMM.MMMM)
+ "(\\d+)(\\d{2}.\\d+)," + // Latitude (DDMM.MMMM)
"([NS])," +
- "(\\d+)(\\d{2}.\\d{4})," + // Longitude (DDMM.MMMM)
+ "(\\d+)(\\d{2}.\\d+)," + // Longitude (DDMM.MMMM)
"([EW])," +
- "(\\d+.\\d+)," + // Speed
- "(\\d+.\\d+)?," + // Course
+ "(\\d+.?\\d*)," + // Speed
+ "(\\d+.?\\d*)?," + // Course
"(\\d{2})(\\d{2})(\\d{2})," + // Date (DDMMYY)
"(\\p{XDigit}{8})" + // Status
".*");