diff options
author | Anton Tananaev <anton@traccar.org> | 2022-03-08 18:36:44 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-03-08 18:36:44 -0800 |
commit | 9d0682014dd293139a56b3d08e76469a726efebd (patch) | |
tree | 466e4224b8058d052476d89d00e492e2f0e12445 /src/main/java | |
parent | 5f007edebf88afb353f26310645639e051a53c0e (diff) | |
download | trackermap-server-9d0682014dd293139a56b3d08e76469a726efebd.tar.gz trackermap-server-9d0682014dd293139a56b3d08e76469a726efebd.tar.bz2 trackermap-server-9d0682014dd293139a56b3d08e76469a726efebd.zip |
Fix TeraTrack coordinates decoding
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java index 7cd678f8a..8f4438fbb 100644 --- a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java @@ -57,12 +57,8 @@ public class TeraTrackProtocolDecoder extends BaseProtocolDecoder { position.setTime(dateFormat.parse(json.getString("DateTime"))); position.setValid(true); - - double latitude = Double.parseDouble(json.getString("Latitude")); - position.setLatitude(json.getString("LatitudeState").equals("0") ? -latitude : latitude); - double longitude = Double.parseDouble(json.getString("Longitude")); - position.setLongitude(json.getString("LongitudeState").equals("0") ? -longitude : longitude); - + position.setLatitude(Double.parseDouble(json.getString("Latitude"))); + position.setLongitude(Double.parseDouble(json.getString("Longitude"))); position.setSpeed(UnitsConverter.knotsFromKph(Integer.parseInt(json.getString("Speed")))); position.set(Position.KEY_ODOMETER, Integer.parseInt(json.getString("Mileage"))); |