aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-01-20 23:34:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-01-20 23:34:15 +1300
commit590e30751c9e16470bdf1e90e26437c7a9bd20ee (patch)
treeb38c655fcbe0c357a152d5cd38ee8d2fe33a44df /src
parentabbe79284a3c78125fc655329a0656428dcb2920 (diff)
downloadtraccar-server-590e30751c9e16470bdf1e90e26437c7a9bd20ee.tar.gz
traccar-server-590e30751c9e16470bdf1e90e26437c7a9bd20ee.tar.bz2
traccar-server-590e30751c9e16470bdf1e90e26437c7a9bd20ee.zip
Fix Wialon decoder pattern
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index 33656f2a2..65f800351 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
super(serverManager);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"#S?D#" +
"(\\d{2})(\\d{2})(\\d{2});" + // Date (DDMMYY)
"(\\d{2})(\\d{2})(\\d{2});" + // Time (HHMMSS)
@@ -43,9 +43,9 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
"([NS]);" +
"(\\d{3})(\\d{2}\\.\\d+);" + // Longitude (DDDMM.MMMM)
"([EW]);" +
- "(\\d+);" + // Speed
- "(\\d+);" + // Course
- "(\\d+);" + // Altitude
+ "(\\d+\\.?\\d*);" + // Speed
+ "(\\d+\\.?\\d*);" + // Course
+ "(\\d+\\.?\\d*);" + // Altitude
"(\\d+)" + // Satellites
".*"); // Full format