From 38d92c6241131c3e028e0d2c2e6795af983a106e Mon Sep 17 00:00:00 2001 From: "Satish K. Pagare" Date: Sat, 1 Aug 2015 16:07:40 +0530 Subject: Added speed and course information to the traccar log. This would help render the track on a different UI. As well this information could be pushed into elasticsearch via logstash for better analytics. --- src/org/traccar/MainEventHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java index 9c28d7c9d..e0d7b0962 100644 --- a/src/org/traccar/MainEventHandler.java +++ b/src/org/traccar/MainEventHandler.java @@ -41,7 +41,9 @@ public class MainEventHandler extends IdleStateAwareChannelHandler { s.append("id: ").append(position.getDeviceId()).append(", "); s.append("time: ").append(position.getFixTime()).append(", "); s.append("lat: ").append(position.getLatitude()).append(", "); - s.append("lon: ").append(position.getLongitude()); + s.append("lon: ").append(position.getLongitude()).append(", "); + s.append("speed: ").append(position.getSpeed()).append(", "); + s.append("course: ").append(position.getCourse()).append(", "); Log.info(s.toString()); Context.getConnectionManager().update(position); -- cgit v1.2.3