aboutsummaryrefslogtreecommitdiff
path: root/src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2011-09-05 08:07:43 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2011-09-05 08:07:43 +0000
commit68d855d0f3c7fa09003c8ae497060831c7bdce7f (patch)
tree6ca413488db8c2697550b66dc89ddb0beff7ae56 /src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java
parent39e60fdb4c4427d73881e4dc692c87b135582a8e (diff)
downloadtrackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.gz
trackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.bz2
trackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.zip
Diffstat (limited to 'src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java')
-rw-r--r--src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java b/src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java
index afd2405c8..73b7cef11 100644
--- a/src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java
+++ b/src/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoder.java
@@ -66,8 +66,8 @@ public class XexunProtocolDecoder extends OneToOneDecoder {
"([NS])," +
"([\\d]{3})([\\d]{2}.[\\d]{4})," + // Longitude (DDDMM.MMMM)
"([EW])," +
- "([\\d]+.[\\d]{2})," + // Speed
- "([\\d]+.[\\d]{2})?," + // Course
+ "([\\d]+.[\\d]+)," + // Speed
+ "([\\d]+.[\\d]+)?," + // Course
"([\\d]{2})([\\d]{2})([\\d]{2})," + // Date (DDMMYY)
".*imei:" +
"([\\d]+),"); // IMEI
@@ -114,6 +114,9 @@ public class XexunProtocolDecoder extends OneToOneDecoder {
if (parser.group(index++).compareTo("W") == 0) lonlitude = -lonlitude;
position.setLongitude(lonlitude);
+ // Altitude
+ position.setAltitude(0.0);
+
// Speed
position.setSpeed(Double.valueOf(parser.group(index++)));