From 4aa19cf3ab240abb7dc9c16240d993f5b525edaa Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 20 Aug 2013 20:22:49 +1200 Subject: Fix GlobalSat decoder --- src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index 974fe7699..3d3ecd02e 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -121,13 +121,13 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { break; case '1': double longitude = Double.valueOf(value.substring(1)); - if (value.charAt(0) == 'E') longitude = -longitude; + if (value.charAt(0) == 'W') longitude = -longitude; position.setLongitude(longitude); break; case '2': longitude = Double.valueOf(value.substring(4)) / 60; longitude += Integer.valueOf(value.substring(1, 4)); - if (value.charAt(0) == 'E') longitude = -longitude; + if (value.charAt(0) == 'W') longitude = -longitude; position.setLongitude(longitude); break; case '3': -- cgit v1.2.3