diff options
Diffstat (limited to 'src/org/traccar/protocol/TrackboxProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TrackboxProtocolDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java index 677f88cdc..deb2f2775 100644 --- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java +++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java @@ -82,23 +82,23 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder { position.setDeviceId(deviceSession.getDeviceId()); DateBuilder dateBuilder = new DateBuilder() - .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt(), parser.nextInt()); + .setTime(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0), parser.nextInt(0)); position.setLatitude(parser.nextCoordinate()); position.setLongitude(parser.nextCoordinate()); position.set(Position.KEY_HDOP, parser.next()); - position.setAltitude(parser.nextDouble()); + position.setAltitude(parser.nextDouble(0)); - int fix = parser.nextInt(); + int fix = parser.nextInt(0); position.set(Position.KEY_GPS, fix); position.setValid(fix > 0); - position.setCourse(parser.nextDouble()); - position.setSpeed(parser.nextDouble()); + position.setCourse(parser.nextDouble(0)); + position.setSpeed(parser.nextDouble(0)); - dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()); + dateBuilder.setDateReverse(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0)); position.setTime(dateBuilder.getDate()); position.set(Position.KEY_SATELLITES, parser.next()); |