Index: src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/OpenFileAction.java	(Revision 1314)
+++ src/org/openstreetmap/josm/actions/OpenFileAction.java	(Arbeitskopie)
@@ -23,6 +23,7 @@
 import org.openstreetmap.josm.io.GpxReader;
 import org.openstreetmap.josm.io.NmeaReader;
 import org.openstreetmap.josm.io.OsmReader;
+import org.openstreetmap.josm.io.TangoReader;
 import org.xml.sax.SAXException;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -61,6 +62,8 @@
                 openFileAsGpx(file);
             else if (asNmeaData(file.getName()))
                 openFileAsNmea(file);
+            else if (asTangoData(file.getName()))
+                openFileAsTango(file);
             else
                 openAsData(file);
         } catch (SAXException x) {
@@ -169,6 +172,27 @@
         }
     }
 
+    private void openFileAsTango(File file) throws IOException, FileNotFoundException {
+        String fn = file.getName();
+        if (ExtensionFileFilter.filters[ExtensionFileFilter.TANGO].acceptName(fn)) {
+            TangoReader r = null;
+            InputStream is = new FileInputStream(file);
+            r = new TangoReader(is,file.getAbsoluteFile().getParentFile());
+            r.data.storageFile = file;
+            GpxLayer gpxLayer = new GpxLayer(r.data, fn);
+            Main.main.addLayer(gpxLayer);
+            if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
+                MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), file, gpxLayer);
+                if (ml.data.size() > 0) {
+                    Main.main.addLayer(ml);
+                }
+            }
+
+        } else {
+            throw new IllegalStateException();
+        }
+    }
+
     private boolean asGpxData(String fn) {
         return ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn);
     }
@@ -177,5 +201,8 @@
         return ExtensionFileFilter.filters[ExtensionFileFilter.NMEA].acceptName(fn);
     }
 
+    private boolean asTangoData(String fn) {
+        return ExtensionFileFilter.filters[ExtensionFileFilter.TANGO].acceptName(fn);
+    }
 
 }
Index: src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(Revision 1314)
+++ src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(Arbeitskopie)
@@ -21,11 +21,13 @@
     public static final int OSM = 0;
     public static final int GPX = 1;
     public static final int NMEA = 2;
+    public static final int TANGO = 3;
 
     public static ExtensionFileFilter[] filters = {
         new ExtensionFileFilter("osm,xml", "osm", tr("OSM Server Files (*.osm *.xml)")),
         new ExtensionFileFilter("gpx,gpx.gz", "gpx", tr("GPX Files (*.gpx *.gpx.gz)")),
         new ExtensionFileFilter("nmea,txt", "nmea", tr("NMEA-0183 Files (*.nmea *.txt)")),
+        new ExtensionFileFilter("log", "log", tr("TangoGPS Files (*.log)")),
     };
 
     /**
Index: src/org/openstreetmap/josm/io/TangoReader.java
===================================================================
--- src/org/openstreetmap/josm/io/TangoReader.java	(Revision 0)
+++ src/org/openstreetmap/josm/io/TangoReader.java	(Revision 0)
@@ -0,0 +1,82 @@
+//License: GPL. Copyright 2008 by Christoph Brill
+
+package org.openstreetmap.josm.io;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.WayPoint;
+
+/**
+ * Read a log file from TangoGPS. These are simple text files in the
+ * form: <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>
+ *
+ * @author cbrill
+ */
+public class TangoReader {
+
+    public GpxData data;
+
+    public TangoReader(InputStream source, File relativeMarkerPath) {
+
+        // create the data tree
+        data = new GpxData();
+        GpxTrack currentTrack = new GpxTrack();
+        data.tracks.add(currentTrack);
+        ArrayList<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
+
+        BufferedReader rd = null;
+        try {
+
+            rd = new BufferedReader(new InputStreamReader(source));
+
+            String line;
+            while ((line = rd.readLine()) != null) {
+                String[] lineElements = line.split(",");
+		if (lineElements.length == 7) {
+	            WayPoint currentWayPoint = new WayPoint(parseLatLon(lineElements));
+	            currentWayPoint.attr.put("ele", lineElements[2]);
+	            currentWayPoint.attr.put("time", lineElements[6]);
+        	    currentWayPoint.setTime();
+        	    currentTrackSeg.add(currentWayPoint);
+		}
+            }
+            currentTrack.trackSegs.add(currentTrackSeg);
+            data.recalculateBounds();
+        } catch (final IOException e) {
+            // TODO tell user about the problem?
+            e.printStackTrace();
+        } finally {
+            if (rd != null) {
+                try {
+                    rd.close();
+                } catch (IOException e) {
+                    // Don't care
+                }
+            }
+        }
+    }
+
+    private double parseCoord(String s) {
+        try {
+            return Double.parseDouble(s);
+        } catch (NumberFormatException ex) {
+            return Double.NaN;
+        }
+    }
+
+    private LatLon parseLatLon(String[] lineElements) {
+	if (lineElements.length < 2) {
+	    return null;
+	}
+        return new LatLon(parseCoord(lineElements[0]), parseCoord(lineElements[1]));
+    }
+}
