diff options
-rw-r--r-- | src/org/traccar/protocol/GpsGateProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/GpsGateProtocolDecoderTest.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java index afc17a9f7..ac859b592 100644 --- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java @@ -52,9 +52,9 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder { .number("(d+),") // imei .expression("[^,]*,") // command .expression("[^,]*,") - .number("(dd)(dd.d+),") // latitude + .number("(d+)(dd.d+),") // latitude .expression("([NS]),") - .number("(ddd)(dd.d+),") // longitude + .number("(d+)(dd.d+),") // longitude .expression("([EW]),") .number("(d+.?d*),") // altitude .number("(d+.?d*),") // speed diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java index 11cfb66f5..67c5ccf51 100644 --- a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class GpsGateProtocolDecoderTest extends ProtocolTest { GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(new GpsGateProtocol()); verifyPosition(decoder, text( + "$FRCMD,0097,_SendMessage,,7618.51990,S,4002.26182,E,350.0,1.08,0.0,250816,183522.000,0*7F")); + + verifyPosition(decoder, text( "$FRCMD,356406061385182,_SendMessage,,5223.88542,N,11440.45866,W,951.2,0.027,,220716,153507.00,1*5F")); verifyPosition(decoder, text( |