mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 12:15:28 +00:00
another fix to the polar data CSV export from the DataMining presenter:
add ';' also for the columns with negative values
This commit is contained in:
+14
@@ -16,6 +16,20 @@
|
|||||||
<li>We introduced two new metrics for tail color and competitor chart: Change of Gap, and Change of Gap to Leader.
|
<li>We introduced two new metrics for tail color and competitor chart: Change of Gap, and Change of Gap to Leader.
|
||||||
These represent an average of the respective gap value change over the last approximately five position fixes,
|
These represent an average of the respective gap value change over the last approximately five position fixes,
|
||||||
e.g., 5s for a 1Hz sampling rate.</li>
|
e.g., 5s for a 1Hz sampling rate.</li>
|
||||||
|
<li>When using tail colors to visualize metrics, so far we spread the value range across the colors available
|
||||||
|
in a "linear" way. This made outliers and maneuvers waste a lot of the color space. Instead, for all
|
||||||
|
metrics except over ground (COG) we now use a cubic root function that reserves most of
|
||||||
|
the available color space to the values in the middle of the range to be visualized, whereas
|
||||||
|
the values closer to the boundaries of the range are assigned less space of the color range.
|
||||||
|
See how the color key displayed at the top of the map changed.</li>
|
||||||
|
<li>Introduced a new metric for visualization in the competitor chart and as a tail color: percent
|
||||||
|
target boat speed. This is computed from the polar data and the local wind conditions (TWS, TWA)
|
||||||
|
at the position of the competitor at the given time point.</li>
|
||||||
|
<li>Hovering over a colored tail on the map where the color represents a detail value as selected by the user,
|
||||||
|
the tool tip that pops up will now display the detail value at the point over which the mouse pointer
|
||||||
|
is hovering.</li>
|
||||||
|
<li>Another fix to the polar data CSV export from the Data Mining module; the ";" separators were missing
|
||||||
|
for the negative (port tack) angles.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h5 class="articleSubheadline">December 2024</h5>
|
<h5 class="articleSubheadline">December 2024</h5>
|
||||||
<ul class="bulletList">
|
<ul class="bulletList">
|
||||||
|
|||||||
+2
-2
@@ -42,11 +42,11 @@ public class ChartToCsvExporter {
|
|||||||
private static String createCsvExportContentForStatisticsCurve(Chart chartToExport) {
|
private static String createCsvExportContentForStatisticsCurve(Chart chartToExport) {
|
||||||
if (chartToExport != null && chartToExport.getSeries().length > 0) {
|
if (chartToExport != null && chartToExport.getSeries().length > 0) {
|
||||||
final StringBuilder csvStr = new StringBuilder("Series name");
|
final StringBuilder csvStr = new StringBuilder("Series name");
|
||||||
|
int minX = Integer.MAX_VALUE;
|
||||||
{
|
{
|
||||||
final List<String> columnNames = new ArrayList<>();
|
final List<String> columnNames = new ArrayList<>();
|
||||||
// collect column names across all series; some may not have points for all columns
|
// collect column names across all series; some may not have points for all columns
|
||||||
for (final Series series : chartToExport.getSeries()) {
|
for (final Series series : chartToExport.getSeries()) {
|
||||||
int minX = Integer.MAX_VALUE;
|
|
||||||
for (final Point p : series.getPoints()) {
|
for (final Point p : series.getPoints()) {
|
||||||
if (p.getX().intValue() < minX) {
|
if (p.getX().intValue() < minX) {
|
||||||
minX = p.getX().intValue();
|
minX = p.getX().intValue();
|
||||||
@@ -73,7 +73,7 @@ public class ChartToCsvExporter {
|
|||||||
csvStr.append(series.getName());
|
csvStr.append(series.getName());
|
||||||
int lastXIndex = -1;
|
int lastXIndex = -1;
|
||||||
for (Point point : series.getPoints()) {
|
for (Point point : series.getPoints()) {
|
||||||
while (lastXIndex < point.getX().intValue()) {
|
while (lastXIndex < point.getX().intValue()-minX) {
|
||||||
csvStr.append(';');
|
csvStr.append(';');
|
||||||
lastXIndex++;
|
lastXIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user