diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol/WialonProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/WialonProtocolDecoder.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java b/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java index 4c4ff7a63..e2ccfe9d8 100644 --- a/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/WialonProtocolDecoder.java @@ -148,7 +148,16 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder { // (true, yes, etc), in which case we convert into a boolean try { - position.set(key, Double.parseDouble(value)); + double double_value = Double.parseDouble(value); + + // Since accuracy is not part of the general parameter list, + // we need to handle it separately by calling setAccuracy directly + if (key.equals("accuracy")) { + position.setAccuracy(double_value); + } + else { + position.set(key, double_value); + } } catch (NumberFormatException e) { if (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("t") || value.equalsIgnoreCase("yes") || value.equalsIgnoreCase("y") |