X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Fcharts%2FCharter.java;h=5b7ae83c29470ae7fa51306446554c10514405d2;hb=ff33ebba6b7c62834f6dae16ce33eb2c710b160e;hp=0bb377fe2b1c4fe728b1020c1fe6799456ce6a66;hpb=4d5796d02a15808311c09448d79e6e7d1de9d636;p=GpsPrune.git diff --git a/tim/prune/function/charts/Charter.java b/tim/prune/function/charts/Charter.java index 0bb377f..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(); @@ -517,6 +520,7 @@ public class Charter extends GenericFunction { // Calculate speeds using the same formula as the profile chart SpeedData speeds = new SpeedData(inTrack); + speeds.init(Config.getUnitSet()); final int numPoints = inTrack.getNumPoints(); ChartSeries values = new ChartSeries(numPoints); @@ -540,6 +544,7 @@ public class Charter extends GenericFunction { // Calculate speeds using the same formula as the profile chart VerticalSpeedData speeds = new VerticalSpeedData(inTrack); + speeds.init(Config.getUnitSet()); final int numPoints = inTrack.getNumPoints(); ChartSeries values = new ChartSeries(numPoints);