From f0d1468ceae065f0cdae6f6ae3323dec5636f073 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 28 Sep 2010 17:56:49 -0700 Subject: altosui: Add KML file export. Command line has switches now, --kml and --csv Export save dialog has combo box to select kml or csv result. Signed-off-by: Keith Packard --- ao-tools/altosui/AltosCSV.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ao-tools/altosui/AltosCSV.java') diff --git a/ao-tools/altosui/AltosCSV.java b/ao-tools/altosui/AltosCSV.java index 3a9e48f8..df98b2b4 100644 --- a/ao-tools/altosui/AltosCSV.java +++ b/ao-tools/altosui/AltosCSV.java @@ -22,9 +22,7 @@ import java.io.*; import java.text.*; import java.util.*; -import altosui.AltosRecord; - -public class AltosCSV { +public class AltosCSV implements AltosWriter { File name; PrintStream out; boolean header_written; @@ -33,9 +31,9 @@ public class AltosCSV { LinkedList pad_records; AltosState state; - static final int ALTOS_CSV_VERSION = 1; + static final int ALTOS_CSV_VERSION = 2; - /* Version 1 format: + /* Version 2 format: * * General info * version number @@ -91,7 +89,7 @@ public class AltosCSV { void write_general(AltosRecord record) { out.printf("%s, %d, %d, %s, %8.2f, %4d, %3d", - record.version, record.serial, record.flight, record.callsign, + ALTOS_CSV_VERSION, record.serial, record.flight, record.callsign, (double) record.time, record.rssi, record.status & 0x7f); -- cgit v1.2.3