Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileBase.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileBase.java	(revision 23735)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileBase.java	(revision 23736)
@@ -52,4 +52,5 @@
 	private int maxHeight;
 	private int avrgHeight;
+	private double dist;
 	private Date start = new Date();
 	private Date end = new Date();
@@ -62,4 +63,5 @@
 	private int gain;
 	private int lastEle;
+	private WayPoint lastWayPoint;
 
 	private static boolean ignoreZeroHeight = true;
@@ -133,4 +135,5 @@
 		gain = 0;
 		lastEle = 0;
+		dist = 0.0;
 
 		for (WayPoint wayPoint : this.wayPoints) {
@@ -331,4 +334,13 @@
 	}
 	
+	
+	/* (non-Javadoc)
+	 * @see org.openstreetmap.josm.plugins.elevation.IElevationProfile#getDistance()
+	 */
+	@Override
+	public double getDistance() {
+		return dist / 1000.0; // dist is in meters
+	}
+
 	/**
 	 * Returns the time between start and end of the track.
@@ -474,6 +486,13 @@
 
 			sumEle += ele;
-			lastEle = ele;
-		}
+			lastEle = ele;			
+		}
+		
+		// determine distance
+		if (lastWayPoint != null) {
+			double d = wp.getCoor().greatCircleDistance(lastWayPoint.getCoor());
+			dist += d;
+		}
+		lastWayPoint = wp;
 	}
 }
Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IElevationProfile.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IElevationProfile.java	(revision 23735)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IElevationProfile.java	(revision 23736)
@@ -62,4 +62,9 @@
 	 */
 	public abstract int getMaxHeight();
+	
+	/**
+	 * Gets the distance of the track in kilometers.
+	 */
+	public abstract double getDistance();
 	
 	/**
Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 23735)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 23736)
@@ -38,5 +38,4 @@
 import javax.swing.JTextField;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.gpx.GpxData;
 import org.openstreetmap.josm.gui.MapView;
@@ -84,4 +83,5 @@
 	
 	private ElevationProfileLayer profileLayer;
+	private JLabel distLabel;
 
 	/**
@@ -133,22 +133,25 @@
 		c.gridx = 1;
 		c.gridy = 0;
-		dataPanel.add(new JLabel(tr("Lowest")), c);
+		dataPanel.add(new JLabel(tr("Min")), c);
 		c.gridx = 2;
 		c.gridy = 0;
-		dataPanel.add(new JLabel(tr("Average")), c);
+		dataPanel.add(new JLabel(tr("Avrg")), c);
 		c.gridx = 3;
 		c.gridy = 0;
-		dataPanel.add(new JLabel(tr("Highest")), c);		
+		dataPanel.add(new JLabel(tr("Max")), c);
 		c.gridx = 4;
 		c.gridy = 0;
-		dataPanel.add(new JLabel(tr("Gain ")), c);
+		dataPanel.add(new JLabel(tr("Dist")), c);
 		c.gridx = 5;
 		c.gridy = 0;
-		dataPanel.add(new JLabel(tr("Time ")), c);
+		dataPanel.add(new JLabel(tr("Gain")), c);
+		c.gridx = 6;
+		c.gridy = 0;
+		dataPanel.add(new JLabel(tr("Time")), c);
 
 		// second row
 		c.gridx = 0;
 		c.gridy = 1;
-		dataPanel.add(new JLabel(tr("Elevation")), c);
+		dataPanel.add(new JLabel(tr("Ele")), c);
 		c.gridx = 1;
 		c.gridy = 1;
@@ -168,8 +171,13 @@
 		c.gridx = 4;
 		c.gridy = 1;
+		distLabel = new JLabel("0 km");
+		dataPanel.add(distLabel, c);
+		
+		c.gridx = 5;
+		c.gridy = 1;
 		elevationGainLabel = new JLabel("0 m");
 		dataPanel.add(elevationGainLabel, c);
 		
-		c.gridx = 5;
+		c.gridx = 6;
 		c.gridy = 1;
 		totalTimeLabel = new JLabel("0");
@@ -179,5 +187,5 @@
 		c.gridx = 0;
 		c.gridy = 2;
-		c.gridwidth = 6;
+		c.gridwidth = 7;
 		dataPanel.add(new JSeparator(), c);
 
@@ -313,4 +321,6 @@
 					.getGain()));
 			totalTimeLabel.setText(String.format("%d:%d h", hours, minutes));
+			distLabel.setText(String.format("%5.2f km", profile
+					.getDistance()));
 		} else {
 			minHeightLabel.setText("-");
@@ -319,4 +329,5 @@
 			elevationGainLabel.setText("-");
 			totalTimeLabel.setText("-");
+			distLabel.setText("-");
 		}
 		
