From 9d0682014dd293139a56b3d08e76469a726efebd Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 8 Mar 2022 18:36:44 -0800 Subject: Fix TeraTrack coordinates decoding --- src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/main') 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"))); -- cgit v1.2.3