aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/YwtProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/YwtProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/YwtProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/YwtProtocolDecoder.java b/src/org/traccar/protocol/YwtProtocolDecoder.java
index d79ae4439..6a98ab9e7 100644
--- a/src/org/traccar/protocol/YwtProtocolDecoder.java
+++ b/src/org/traccar/protocol/YwtProtocolDecoder.java
@@ -91,11 +91,11 @@ public class YwtProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG));
position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG));
- position.setAltitude(parser.nextDouble());
- position.setSpeed(parser.nextDouble());
- position.setCourse(parser.nextDouble());
+ position.setAltitude(parser.nextDouble(0));
+ position.setSpeed(parser.nextDouble(0));
+ position.setCourse(parser.nextDouble(0));
- int satellites = parser.nextInt();
+ int satellites = parser.nextInt(0);
position.setValid(satellites >= 3);
position.set(Position.KEY_SATELLITES, satellites);