diff options
-rw-r--r-- | src/main/java/org/traccar/protocol/MoovboxProtocolDecoder.java | 4 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/MoovboxProtocolDecoder.java b/src/main/java/org/traccar/protocol/MoovboxProtocolDecoder.java index 1c8cde8a2..3116d073c 100644 --- a/src/main/java/org/traccar/protocol/MoovboxProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/MoovboxProtocolDecoder.java @@ -89,8 +89,8 @@ public class MoovboxProtocolDecoder extends BaseHttpProtocolDecoder { position.setValid(true); position.setTime(new Date(Long.parseLong(xPath.evaluate("time", node)) * 1000)); - position.setLatitude(Double.parseDouble(xPath.evaluate("latitude", node))); - position.setLongitude(Double.parseDouble(xPath.evaluate("longitude", node))); + position.setLatitude(Double.parseDouble(xPath.evaluate("longitude", node))); + position.setLongitude(Double.parseDouble(xPath.evaluate("latitude", node))); position.setAltitude(Double.parseDouble(xPath.evaluate("altitude", node))); position.setSpeed(Double.parseDouble(xPath.evaluate("speed", node))); diff --git a/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java index c0090e9f2..9b3f6823a 100644 --- a/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java @@ -12,7 +12,7 @@ public class MoovboxProtocolDecoderTest extends ProtocolTest { MoovboxProtocolDecoder decoder = new MoovboxProtocolDecoder(null); verifyPositions(decoder, request(HttpMethod.POST, "/", - buffer("<gps id=\"911\">\n<coordinates><coordinate>\n<fix>3</fix>\n<time>1597580050</time>\n<latitude>80.726257</latitude>\n<longitude>13.821351</longitude>\n<altitude>9.500000</altitude>\n<climb>0.000000</climb>\n<speed>0.064000</speed>\n<separation>-27.300000</separation>\n<track>0.000000</track>\n<satellites>9</satellites>\n</coordinate></coordinates>\n</gps>"))); + buffer("<gps id=\"911\">\n<coordinates><coordinate>\n<fix>3</fix>\n<time>1597580050</time>\n<latitude>100.726257</latitude>\n<longitude>13.821351</longitude>\n<altitude>9.500000</altitude>\n<climb>0.000000</climb>\n<speed>0.064000</speed>\n<separation>-27.300000</separation>\n<track>0.000000</track>\n<satellites>9</satellites>\n</coordinate></coordinates>\n</gps>"))); } |