Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGPSPreferences.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGPSPreferences.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGPSPreferences.java	(revision 36117)
@@ -22,4 +22,38 @@
  */
 public class LiveGPSPreferences extends DefaultTabPreferenceSetting {
+    /* option to use serial port direct access */
+    public static final String C_SERIAL = "livegps.serial.port";
+    /* default gpsd host address */
+    public static final String DEFAULT_HOST = "localhost";
+    /* option to use specify gpsd host address */
+    public static final String C_HOST = "livegps.gpsd.host";
+    /* default gpsd port number */
+    public static final int DEFAULT_PORT = 2947;
+    /* option to use specify gpsd port number */
+    public static final String C_PORT = "livegps.gpsd.port";
+    /* option to use specify gpsd disabling */
+    public static final String C_DISABLED = "livegps.gpsd.disabled";
+
+    public static final String C_LIVEGPS_COLOR_POSITION = "color.livegps.position";
+    public static final String C_LIVEGPS_COLOR_POSITION_ESTIMATE = "color.livegps.position_estimate";
+
+    /* options below are hidden/expert options */
+
+    /* option to use even duplicate positions (default false) */
+    public static final String C_ALLPOSITIONS = "livegps.positions.all";
+    /* option to show offset to next way (default false) */
+    public static final String C_WAYOFFSET = "livegps.way.offset";
+
+    public static final String C_CURSOR_H = "livegps.cursor_height"; /* in pixels */
+    public static final String C_CURSOR_W = "livegps.cursor_width"; /* in pixels */
+    public static final String C_CURSOR_T = "livegps.cursor_thickness"; /* in pixels */
+
+    public static final int DEFAULT_REFRESH_INTERVAL = 250;
+    public static final String C_REFRESH_INTERVAL = "livegps.refresh_interval_msec";  /* in msec */
+    public static final int DEFAULT_CENTER_INTERVAL = 5000;
+    public static final String C_CENTER_INTERVAL = "livegps.center_interval_msec";  /* in msec */
+    public static final int DEFAULT_CENTER_FACTOR = 80;
+    public static final String C_CENTER_FACTOR = "livegps.center_factor" /* in percent */;
+
     private final JTextField gpsdHost = new JTextField(30);
     private final JTextField gpsdPort = new JTextField(30);
@@ -35,20 +69,20 @@
         JPanel panel = new JPanel(new GridBagLayout());
 
-        gpsdHost.setText(Config.getPref().get(LiveGpsAcquirer.C_HOST, LiveGpsAcquirer.DEFAULT_HOST));
-        gpsdHost.setToolTipText(tr("Host address of gpsd, default is {0}", LiveGpsAcquirer.DEFAULT_HOST));
+        gpsdHost.setText(Config.getPref().get(C_HOST, DEFAULT_HOST));
+        gpsdHost.setToolTipText(tr("Host address of gpsd, default is {0}", DEFAULT_HOST));
         panel.add(new JLabel(tr("Host address of gpsd")), GBC.std());
         panel.add(gpsdHost, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 0, 0, 5));
 
-        gpsdPort.setText(String.valueOf(Config.getPref().getInt(LiveGpsAcquirer.C_PORT, LiveGpsAcquirer.DEFAULT_PORT)));
-        gpsdPort.setToolTipText(tr("Port number of gpsd, default is {0}", LiveGpsAcquirer.DEFAULT_PORT));
+        gpsdPort.setText(String.valueOf(Config.getPref().getInt(C_PORT, DEFAULT_PORT)));
+        gpsdPort.setToolTipText(tr("Port number of gpsd, default is {0}", DEFAULT_PORT));
         panel.add(new JLabel(tr("Port number gpsd")), GBC.std());
         panel.add(gpsdPort, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 0, 0, 5));
 
-        serialDevice.setText(Config.getPref().get(LiveGpsAcquirerNMEA.C_SERIAL));
+        serialDevice.setText(Config.getPref().get(C_SERIAL));
         serialDevice.setToolTipText(tr("Serial device for direct NMEA input, does not exist by default"));
         panel.add(new JLabel(tr("Serial device")), GBC.std());
         panel.add(serialDevice, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 0, 0, 5));
 
-        disableGPSD.setSelected(Config.getPref().getBoolean(LiveGpsAcquirer.C_DISABLED));
+        disableGPSD.setSelected(Config.getPref().getBoolean(C_DISABLED));
         panel.add(disableGPSD, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 0, 0, 5));
 
@@ -59,8 +93,8 @@
     @Override
     public boolean ok() {
-        Config.getPref().put(LiveGpsAcquirer.C_HOST, gpsdHost.getText());
-        Config.getPref().put(LiveGpsAcquirer.C_PORT, gpsdPort.getText());
-        Config.getPref().put(LiveGpsAcquirerNMEA.C_SERIAL, serialDevice.getText());
-        Config.getPref().putBoolean(LiveGpsAcquirer.C_DISABLED, disableGPSD.isSelected());
+        Config.getPref().put(C_HOST, gpsdHost.getText());
+        Config.getPref().put(C_PORT, gpsdPort.getText());
+        Config.getPref().put(C_SERIAL, serialDevice.getText());
+        Config.getPref().putBoolean(C_DISABLED, disableGPSD.isSelected());
         return false;
     }
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 36117)
@@ -25,14 +25,4 @@
 
 public class LiveGpsAcquirer implements Runnable {
-    /* default gpsd host address */
-    public static final String DEFAULT_HOST = "localhost";
-    /* default gpsd port number */
-    public static final int DEFAULT_PORT = 2947;
-    /* option to use specify gpsd host address */
-    public static final String C_HOST = "livegps.gpsd.host";
-    /* option to use specify gpsd port number */
-    public static final String C_PORT = "livegps.gpsd.port";
-    /* option to use specify gpsd disabling */
-    public static final String C_DISABLED = "livegps.gpsd.disabled";
     private String gpsdHost;
     private int gpsdPort;
@@ -55,9 +45,9 @@
     public LiveGpsAcquirer() {
 
-        gpsdHost = Config.getPref().get(C_HOST, DEFAULT_HOST);
-        gpsdPort = Config.getPref().getInt(C_PORT, DEFAULT_PORT);
+        gpsdHost = Config.getPref().get(LiveGPSPreferences.C_HOST, LiveGPSPreferences.DEFAULT_HOST);
+        gpsdPort = Config.getPref().getInt(LiveGPSPreferences.C_PORT, LiveGPSPreferences.DEFAULT_PORT);
         // put the settings back in to the preferences, makes keys appear.
-        Config.getPref().put(C_HOST, gpsdHost);
-        Config.getPref().putInt(C_PORT, gpsdPort);
+        Config.getPref().put(LiveGPSPreferences.C_HOST, gpsdHost);
+        Config.getPref().putInt(LiveGPSPreferences.C_PORT, gpsdPort);
     }
 
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirerNMEA.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirerNMEA.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirerNMEA.java	(revision 36117)
@@ -25,6 +25,4 @@
  */
 public class LiveGpsAcquirerNMEA implements Runnable {
-    /* option to use serial port direct access */
-    public static final String C_SERIAL = "livegps.serial.port";
     private String serName;
 
@@ -42,5 +40,5 @@
      */
     public LiveGpsAcquirerNMEA() {
-        serName = Config.getPref().get(C_SERIAL);
+        serName = Config.getPref().get(LiveGPSPreferences.C_SERIAL);
     }
 
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 36117)
@@ -5,11 +5,20 @@
 
 import java.awt.Point;
+import java.text.DecimalFormat;
 
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.WayPoint;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
+import org.openstreetmap.josm.data.osm.IPrimitive;
+import org.openstreetmap.josm.data.osm.IWay;
+import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.osm.WaySegment;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.Geometry;
 
 /**
@@ -24,6 +33,6 @@
     private float epx, epy;
     private String wayString;
-    private Way way;
     private WayPoint wp;
+    private static final DecimalFormat offsetFormat = new DecimalFormat("0.00");
 
     public LiveGpsData(double latitude, double longitude, float course, float speed) {
@@ -169,34 +178,27 @@
     public String getWayInfo() {
         if (wayString == null) {
-            Way way = getWay();
+            Node n = new Node(latLon);
+            DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+            Way way = Geometry.getClosestPrimitive(n, ds.getWays());
             if (way != null) {
-                StringBuilder builder = new StringBuilder();
-                String tmp = way.get("name");
-                if (tmp != null) {
-                    builder.append(tmp);
-                } else {
-                    builder.append(tr("no name"));
+                wayString = way.getDisplayName(new DefaultNameFormatter() {
+                     @Override
+                     protected void decorateNameWithId(StringBuilder name, IPrimitive primitive) {
+                     }
+                     @Override
+                     protected void decorateNameWithNodes(StringBuilder name, IWay way) {
+                     }
+                });
+                if (wayString == null) {
+                    wayString = tr("no name");
                 }
-                tmp = way.get("ref");
-                if (tmp != null) {
-                    builder.append(" (").append(tmp).append(")");
+                if (Config.getPref().getBoolean(LiveGPSPreferences.C_WAYOFFSET, false)) {
+                    double offs = Geometry.getDistanceWayNode(way, n);
+                    WaySegment ws = Geometry.getClosestWaySegment(way, n);
+                    if (!Geometry.angleIsClockwise(ws.getFirstNode(), ws.getSecondNode(), n))
+                        offs = -offs;
+                    /* I18N: side offset and way name for livegps way display with offset */
+                    wayString = tr("{0} ({1})", offsetFormat.format(offs), wayString);
                 }
-                tmp = way.get("highway");
-                if (tmp != null) {
-                    builder.append(" {").append(tmp).append("}");
-                }
-                String type = "";
-                tmp = way.get("tunnel");
-                if (tmp != null) {
-                    type = type + "T";
-                }
-                tmp = way.get("bridge");
-                if (tmp != null) {
-                    type = type + "B";
-                }
-                if (type.length() > 0) {
-                    builder.append(" [").append(type).append("]");
-                }
-                wayString = builder.toString();
             } else {
                 wayString = "";
@@ -204,17 +206,4 @@
         }
         return wayString;
-    }
-
-    /**
-     * Returns the closest way to this position.
-     * @return the closest way to this position.
-     */
-    public Way getWay() {
-        MapFrame map = MainApplication.getMap();
-        if (way == null && map != null && map.mapView != null) {
-            Point xy = map.mapView.getPoint(getLatLon());
-            way = map.mapView.getNearestWay(xy, OsmPrimitive::isUsable);
-        }
-        return way;
     }
 
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 36117)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.data.coor.conversion.CoordinateFormatManager;
 import org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat;
+import org.openstreetmap.josm.data.coor.conversion.ProjectedCoordinateFormat;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
@@ -34,5 +35,7 @@
     private JLabel nmeaStatusLabel;
     private JLabel wayLabel;
+    private JLabel latText;
     private JLabel latLabel;
+    private JLabel longText;
     private JLabel longLabel;
     private JLabel courseLabel;
@@ -55,7 +58,7 @@
         panel.add(new JLabel(tr("Way Info")));
         panel.add(wayLabel = new JLabel());
-        panel.add(new JLabel(tr("Latitude")));
+        panel.add(latText = new JLabel(tr("Latitude")));
         panel.add(latLabel = new JLabel());
-        panel.add(new JLabel(tr("Longitude")));
+        panel.add(longText = new JLabel(tr("Longitude")));
         panel.add(longLabel = new JLabel());
         panel.add(new JLabel(tr("Speed")));
@@ -72,5 +75,5 @@
      */
     private void setStatusVisibility(boolean init) {
-        boolean statusGPSDNew = !Config.getPref().getBoolean(LiveGpsAcquirer.C_DISABLED);
+        boolean statusGPSDNew = !Config.getPref().getBoolean(LiveGPSPreferences.C_DISABLED);
         if (init || statusGPSD != statusGPSDNew) {
             statusText.setVisible(statusGPSDNew);
@@ -78,5 +81,5 @@
             statusGPSD = statusGPSDNew;
         }
-        boolean statusNMEANew = !Config.getPref().get(LiveGpsAcquirerNMEA.C_SERIAL).isEmpty();
+        boolean statusNMEANew = !Config.getPref().get(LiveGPSPreferences.C_SERIAL).isEmpty();
         if (init || statusNMEA != statusNMEANew) {
             nmeaStatusText.setVisible(statusNMEANew);
@@ -100,4 +103,11 @@
                     panel.setBackground(Color.WHITE);
                     ICoordinateFormat mCord = CoordinateFormatManager.getDefaultFormat();
+                    if (ProjectedCoordinateFormat.INSTANCE.equals(mCord)) {
+                        latText.setText(tr("Northing"));
+                        longText.setText(tr("Easting"));
+                    } else {
+                        latText.setText(tr("Latitude"));
+                        longText.setText(tr("Longitude"));
+                    }
                     latLabel.setText(mCord.latToString(data.getLatLon()));
                     longLabel.setText(mCord.lonToString(data.getLatLon()));
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java	(revision 36117)
@@ -17,15 +17,8 @@
     private final LiveGpsLayer layer;
 
-    public static final String C_LIVEGPS_COLOR_POSITION = "color.livegps.position";
-    public static final String C_LIVEGPS_COLOR_POSITION_ESTIMATE = "color.livegps.position_estimate";
-
     private static final CachingProperty<Color> COLOR_POSITION =
-            new NamedColorProperty(C_LIVEGPS_COLOR_POSITION, Color.RED).cached();
+            new NamedColorProperty(LiveGPSPreferences.C_LIVEGPS_COLOR_POSITION, Color.RED).cached();
     private static final CachingProperty<Color> COLOR_POSITION_ESTIMATE =
-            new NamedColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached();
-
-    private static final String C_CURSOR_H = "livegps.cursor_height"; /* in pixels */
-    private static final String C_CURSOR_W = "livegps.cursor_width"; /* in pixels */
-    private static final String C_CURSOR_T = "livegps.cursor_thickness"; /* in pixels */
+            new NamedColorProperty(LiveGPSPreferences.C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached();
 
     public LiveGpsDrawHelper(LiveGpsLayer livegpslayer) {
@@ -48,7 +41,7 @@
         Point screen = mv.getPoint(lastPoint.getCoor());
 
-        int TriaHeight = Config.getPref().getInt(C_CURSOR_H, 20);
-        int TriaWidth = Config.getPref().getInt(C_CURSOR_W, 10);
-        int TriaThick = Config.getPref().getInt(C_CURSOR_T, 4);
+        int TriaHeight = Config.getPref().getInt(LiveGPSPreferences.C_CURSOR_H, 20);
+        int TriaWidth = Config.getPref().getInt(LiveGPSPreferences.C_CURSOR_W, 10);
+        int TriaThick = Config.getPref().getInt(LiveGPSPreferences.C_CURSOR_T, 4);
 
         /*
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 36117)
@@ -25,11 +25,4 @@
     public static final String LAYER_NAME = tr("LiveGPS layer");
 
-    private static final int DEFAULT_REFRESH_INTERVAL = 250;
-    private static final int DEFAULT_CENTER_INTERVAL = 5000;
-    private static final int DEFAULT_CENTER_FACTOR = 80;
-    private static final String oldC_REFRESH_INTERVAL = "livegps.refreshinterval";     /* in seconds */
-    private static final String C_REFRESH_INTERVAL = "livegps.refresh_interval_msec";  /* in msec */
-    private static final String C_CENTER_INTERVAL = "livegps.center_interval_msec";  /* in msec */
-    private static final String C_CENTER_FACTOR = "livegps.center_factor" /* in percent */;
     private int refreshInterval;
     private int centerInterval;
@@ -67,5 +60,6 @@
     void setCurrentPosition(double lat, double lon, WayPoint wp) {
         LatLon thisPos = new LatLon(lat, lon);
-        if (lastPos != null && thisPos.equalsEpsilon(lastPos, ILatLon.MAX_SERVER_PRECISION))
+        if (lastPos != null && thisPos.equalsEpsilon(lastPos, ILatLon.MAX_SERVER_PRECISION) &&
+        Config.getPref().getBoolean(LiveGPSPreferences.C_ALLPOSITIONS, false))
             // no change in position
             // maybe show a "paused" cursor or some such
@@ -147,18 +141,13 @@
      */
     private void initIntervals() {
-        if ((refreshInterval = Config.getPref().getInt(oldC_REFRESH_INTERVAL, 0)) != 0) {
-            refreshInterval *= 1000;
-            Config.getPref().put(oldC_REFRESH_INTERVAL, null);
-        } else
-            refreshInterval = Config.getPref().getInt(C_REFRESH_INTERVAL, DEFAULT_REFRESH_INTERVAL);
+        refreshInterval = Config.getPref().getInt(LiveGPSPreferences.C_REFRESH_INTERVAL, LiveGPSPreferences.DEFAULT_REFRESH_INTERVAL);
+        centerInterval = Config.getPref().getInt(LiveGPSPreferences.C_CENTER_INTERVAL, LiveGPSPreferences.DEFAULT_CENTER_INTERVAL);
+        centerFactor = Config.getPref().getInt(LiveGPSPreferences.C_CENTER_FACTOR, LiveGPSPreferences.DEFAULT_CENTER_FACTOR);
+        if (centerFactor <= 1 || centerFactor >= 99)
+            centerFactor = LiveGPSPreferences.DEFAULT_CENTER_FACTOR;
 
-        centerInterval = Config.getPref().getInt(C_CENTER_INTERVAL, DEFAULT_CENTER_INTERVAL);
-        centerFactor = Config.getPref().getInt(C_CENTER_FACTOR, DEFAULT_CENTER_FACTOR);
-        if (centerFactor <= 1 || centerFactor >= 99)
-            centerFactor = DEFAULT_CENTER_FACTOR;
-
-            Config.getPref().putInt(C_REFRESH_INTERVAL, refreshInterval);
-            Config.getPref().putInt(C_CENTER_INTERVAL, centerInterval);
-        Config.getPref().putInt(C_CENTER_FACTOR, (int) centerFactor);
+            Config.getPref().putInt(LiveGPSPreferences.C_REFRESH_INTERVAL, refreshInterval);
+            Config.getPref().putInt(LiveGPSPreferences.C_CENTER_INTERVAL, centerInterval);
+        Config.getPref().putInt(LiveGPSPreferences.C_CENTER_FACTOR, (int) centerFactor);
 
         /*
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 36116)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 36117)
@@ -179,5 +179,5 @@
             assert (acquirerThread == null);
 
-            if (!Config.getPref().getBoolean(LiveGpsAcquirer.C_DISABLED)) {
+            if (!Config.getPref().getBoolean(LiveGPSPreferences.C_DISABLED)) {
 
                 acquirer = new LiveGpsAcquirer();
@@ -196,5 +196,5 @@
             assert (acquirerNMEAThread == null);
 
-            if (!Config.getPref().get(LiveGpsAcquirerNMEA.C_SERIAL).isEmpty()) {
+            if (!Config.getPref().get(LiveGPSPreferences.C_SERIAL).isEmpty()) {
                 acquirerNMEA = new LiveGpsAcquirerNMEA();
                 acquirerNMEAThread = new Thread(acquirerNMEA);
