X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Fcharts%2FCharter.java;h=5b7ae83c29470ae7fa51306446554c10514405d2;hb=ff33ebba6b7c62834f6dae16ce33eb2c710b160e;hp=842084da8b9d7b03ce14c84569e0164e1cf4c3d0;hpb=8c8868ae29b3252f02e094c02307384cf61ba667;p=GpsPrune.git diff --git a/tim/prune/function/charts/Charter.java b/tim/prune/function/charts/Charter.java index 842084d..5b7ae83 100644 --- a/tim/prune/function/charts/Charter.java +++ b/tim/prune/function/charts/Charter.java @@ -284,6 +284,9 @@ public class Charter extends GenericFunction + getSvgValue(_svgHeightField, DEFAULT_SVG_HEIGHT) + "\n"); writer.write("set out '" + svgFile.getAbsolutePath() + "'\n"); } + else { + // For screen output, gnuplot should use the default terminal (windows or x11 or wxt or something) + } if (numCharts > 1) { writer.write("set multiplot layout " + numCharts + ",1\n"); } @@ -374,7 +377,7 @@ public class Charter extends GenericFunction break; } // Make a temporary data file for the output (one per subchart) - File tempFile = File.createTempFile("prunedata", null); + File tempFile = File.createTempFile("gpsprunedata", null); tempFile.deleteOnExit(); // write out values for x and y to temporary file FileWriter tempFileWriter = null; @@ -482,7 +485,7 @@ public class Charter extends GenericFunction if (currPoint.hasTimestamp()) { if (!currPoint.getSegmentStart() && prevTimestamp != null) { - seconds += (currPoint.getTimestamp().getSecondsSince(prevTimestamp)); + seconds += (currPoint.getTimestamp().getMillisecondsSince(prevTimestamp) / 1000.0); } values.setData(i, seconds / 60.0 / 60.0); prevTimestamp = currPoint.getTimestamp();