From bd00157391f3989b5cfb36fd780446424bb1d7af Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 15 Nov 2018 16:22:16 +1300 Subject: Handle decimal altitude --- src/org/traccar/protocol/Xrb28ProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org') 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; } -- cgit v1.2.3