aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-11-15 16:22:16 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-11-15 16:22:16 +1300
commitbd00157391f3989b5cfb36fd780446424bb1d7af (patch)
tree194c1a46a4e208a527b63e9afbe812ea398ad7cb /src/org/traccar/protocol
parent8023e4e3de6fa791157bdec913abcafb511512c9 (diff)
downloadtrackermap-server-bd00157391f3989b5cfb36fd780446424bb1d7af.tar.gz
trackermap-server-bd00157391f3989b5cfb36fd780446424bb1d7af.tar.bz2
trackermap-server-bd00157391f3989b5cfb36fd780446424bb1d7af.zip
Handle decimal altitude
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Xrb28ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Xrb28ProtocolDecoder.java b/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
index a50716abb..eb72dcd1b 100644
--- a/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
@@ -57,7 +57,7 @@ public class Xrb28ProtocolDecoder extends BaseProtocolDecoder {
.number("(d+),") // satellites
.number("(d+.d+),") // hdop
.number("(dd)(dd)(dd),") // date (ddmmyy)
- .number("(-?d+),") // altitude
+ .number("(-?d+.?d*),") // altitude
.expression(".,") // height unit
.expression(".#") // mode
.compile();
@@ -109,7 +109,7 @@ public class Xrb28ProtocolDecoder extends BaseProtocolDecoder {
dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
position.setTime(dateBuilder.getDate());
- position.setAltitude(parser.nextInt());
+ position.setAltitude(parser.nextDouble());
return position;
}