diff options
| author | Keith Packard <keithp@keithp.com> | 2010-09-28 17:56:49 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-09-28 17:56:49 -0700 |
| commit | f0d1468ceae065f0cdae6f6ae3323dec5636f073 (patch) | |
| tree | 58172a481cfae7d68c8b08c524e72440eed2145c /ao-tools/altosui/AltosCSV.java | |
| parent | 5a119fd92532d53e552efe1f7c61e87181fcace0 (diff) | |
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 <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosCSV.java')
| -rw-r--r-- | ao-tools/altosui/AltosCSV.java | 10 |
1 files changed, 4 insertions, 6 deletions
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<AltosRecord> 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); |
