From 2c44646f6b574d399dd2d36afa2e88963c7322af Mon Sep 17 00:00:00 2001 From: Valerii Vyshniak Date: Mon, 23 Jan 2017 00:51:14 +0100 Subject: Reset additional parameters of GPS position after geolocation When geolocation found a lat/lon from LBS/WIFI, only lat/lon and accuracy are updated. If protocol has copied "last" position to "Position" class before issuing the geolocation, then all other parameters of GPS position will be invalid (from "last" position). So this fix reset to 0 the altitude, speed, course and rssi. --- src/org/traccar/GeolocationHandler.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/GeolocationHandler.java b/src/org/traccar/GeolocationHandler.java index 669c31654..31fed5dbd 100644 --- a/src/org/traccar/GeolocationHandler.java +++ b/src/org/traccar/GeolocationHandler.java @@ -57,6 +57,10 @@ public class GeolocationHandler implements ChannelUpstreamHandler { position.setLatitude(latitude); position.setLongitude(longitude); position.setAccuracy(accuracy); + position.setAltitude(0); + position.setSpeed(0); + position.setCourse(0); + position.set(Position.KEY_RSSI, 0); Channels.fireMessageReceived(ctx, position, event.getRemoteAddress()); } -- cgit v1.2.3