diff options
author | Anton Tananaev <anton@traccar.org> | 2024-07-08 05:44:23 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-07-08 05:44:23 -0700 |
commit | b48e4a456f0e44a91d563a8d5b42295e131ebdaf (patch) | |
tree | 22ff60fa9bcf8e1dd767c092de95e047724a169b /src/main/java/org/traccar | |
parent | cf6aa038b7514201ffb89fa26a4ba7d921b8f16f (diff) | |
download | trackermap-server-b48e4a456f0e44a91d563a8d5b42295e131ebdaf.tar.gz trackermap-server-b48e4a456f0e44a91d563a8d5b42295e131ebdaf.tar.bz2 trackermap-server-b48e4a456f0e44a91d563a8d5b42295e131ebdaf.zip |
Revert "Invalid ST-901L-4G coordinates"
This reverts commit 864872b2df3e26c94d3a5826f4df504de3cf6c62.
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/H02ProtocolDecoder.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java index ed6460e97..38c063b52 100644 --- a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java @@ -350,32 +350,24 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { position.setValid(true); } - double latitude = 0; if (parser.hasNext(3)) { - latitude = parser.nextCoordinate(); + position.setLatitude(parser.nextCoordinate()); } if (parser.hasNext(3)) { - latitude = parser.nextCoordinate(); + position.setLatitude(parser.nextCoordinate()); } if (parser.hasNext(4)) { - latitude = parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN_HEM); - } - if (latitude != 99 + 99.9999 / 60) { - position.setLatitude(latitude); + position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN_HEM)); } - double longitude = 0; if (parser.hasNext(3)) { - longitude = parser.nextCoordinate(); + position.setLongitude(parser.nextCoordinate()); } if (parser.hasNext(3)) { - longitude = parser.nextCoordinate(); + position.setLongitude(parser.nextCoordinate()); } if (parser.hasNext(4)) { - longitude = parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN_HEM); - } - if (longitude != 999 + 99.9999 / 60) { - position.setLongitude(longitude); + position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_MIN_MIN_HEM)); } position.setSpeed(parser.nextDouble(0)); |