aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/GeolocationHandler.java4
-rw-r--r--src/org/traccar/model/WifiAccessPoint.java16
2 files changed, 20 insertions, 0 deletions
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());
}
diff --git a/src/org/traccar/model/WifiAccessPoint.java b/src/org/traccar/model/WifiAccessPoint.java
index ddb995412..b18705420 100644
--- a/src/org/traccar/model/WifiAccessPoint.java
+++ b/src/org/traccar/model/WifiAccessPoint.java
@@ -27,6 +27,12 @@ public class WifiAccessPoint {
return wifiAccessPoint;
}
+ public static WifiAccessPoint from(String macAddress, int signalStrength, int channel) {
+ WifiAccessPoint wifiAccessPoint = from(macAddress, signalStrength);
+ wifiAccessPoint.setChannel(channel);
+ return wifiAccessPoint;
+ }
+
private String macAddress;
public String getMacAddress() {
@@ -47,4 +53,14 @@ public class WifiAccessPoint {
this.signalStrength = signalStrength;
}
+ private Integer channel;
+
+ public Integer getChannel() {
+ return channel;
+ }
+
+ public void setChannel(Integer channel) {
+ this.channel = channel;
+ }
+
}