mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-23 22:19:13 +00:00
Merge remote-tracking branch 'origin/simulator_dev'
This commit is contained in:
+4
-3
@@ -317,9 +317,10 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
mapw.setScrollWheelZoomEnabled(true);
|
||||
// mapw.setContinuousZoom(true);
|
||||
mapw.setTitle(stringMessages.simulator() + " " + stringMessages.map());
|
||||
// PositionDTO kiel = new PositionDTO(54.46195148135232, 10.1513671875);
|
||||
PositionDTO trave = new PositionDTO(54.007063, 10.838356); // 53.978276,10.880156);//53.968015,10.891331);
|
||||
LatLng position = LatLng.newInstance(trave.latDeg, trave.lngDeg);
|
||||
PositionDTO kiel = new PositionDTO(54.46195148135232, 10.1513671875);
|
||||
//PositionDTO trave = new PositionDTO(54.007063, 10.838356); // 53.978276,10.880156);//53.968015,10.891331);
|
||||
PositionDTO initialMapPosition = kiel;
|
||||
LatLng position = LatLng.newInstance(initialMapPosition.latDeg, initialMapPosition.lngDeg);
|
||||
mapw.panTo(position);
|
||||
// mapw.panTo(LatLng.newInstance(0, 0));
|
||||
add(mapw, 0, 0);
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.sap.sailing.gwt.ui"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
+10
-10
@@ -21,11 +21,11 @@ public class ConfigurationManagerTest {
|
||||
|
||||
@Before
|
||||
public void initialize() {
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er", 4.995, "resources/PolarDiagram49.csv", 0));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er Bethwaite", 4.876, "resources/PolarDiagram49Bethwaite.csv", 1));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er ORC", 4.995, "resources/PolarDiagram49ORC.csv", 2));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er STG", 4.876, "resources/PolarDiagram49STG.csv", 3));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("505 STG", 5.05, "resources/PolarDiagram505STG.csv", 4));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er", 4.995, "PolarDiagram49.csv", 0));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er Bethwaite", 4.876, "PolarDiagram49Bethwaite.csv", 1));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er ORC", 4.995, "PolarDiagram49ORC.csv", 2));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("49er STG", 4.876, "PolarDiagram49STG.csv", 3));
|
||||
this._boatClassesInfo.add(new BoatClassPropertiesImpl("505 STG", 5.05, "PolarDiagram505STG.csv", 4));
|
||||
|
||||
this._racesInfo
|
||||
.add(new RacePropertiesImpl(
|
||||
@@ -55,15 +55,15 @@ public class ConfigurationManagerTest {
|
||||
|
||||
@Test
|
||||
public void test_getPolarDiagramFileLocation() {
|
||||
Assert.assertEquals("resources/PolarDiagram49.csv", ConfigurationManager.INSTANCE
|
||||
Assert.assertEquals("PolarDiagram49.csv", ConfigurationManager.INSTANCE
|
||||
.getPolarDiagramFileLocation(0));
|
||||
Assert.assertEquals("resources/PolarDiagram49Bethwaite.csv", ConfigurationManager.INSTANCE
|
||||
Assert.assertEquals("PolarDiagram49Bethwaite.csv", ConfigurationManager.INSTANCE
|
||||
.getPolarDiagramFileLocation(1));
|
||||
Assert.assertEquals("resources/PolarDiagram49ORC.csv", ConfigurationManager.INSTANCE
|
||||
Assert.assertEquals("PolarDiagram49ORC.csv", ConfigurationManager.INSTANCE
|
||||
.getPolarDiagramFileLocation(2));
|
||||
Assert.assertEquals("resources/PolarDiagram49STG.csv", ConfigurationManager.INSTANCE
|
||||
Assert.assertEquals("PolarDiagram49STG.csv", ConfigurationManager.INSTANCE
|
||||
.getPolarDiagramFileLocation(3));
|
||||
Assert.assertEquals("resources/PolarDiagram505STG.csv", ConfigurationManager.INSTANCE
|
||||
Assert.assertEquals("PolarDiagram505STG.csv", ConfigurationManager.INSTANCE
|
||||
.getPolarDiagramFileLocation(4));
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -19,7 +19,6 @@ import com.sap.sailing.simulator.impl.PolarDiagram49STG;
|
||||
import com.sap.sailing.simulator.impl.RectangularBoundary;
|
||||
import com.sap.sailing.simulator.impl.SailingSimulatorImpl;
|
||||
import com.sap.sailing.simulator.impl.SimulationParametersImpl;
|
||||
import com.sap.sailing.simulator.impl.SimulatorUISelectionImpl;
|
||||
import com.sap.sailing.simulator.util.SailingSimulatorUtil;
|
||||
import com.sap.sailing.simulator.windfield.WindControlParameters;
|
||||
import com.sap.sailing.simulator.windfield.WindFieldGenerator;
|
||||
@@ -54,7 +53,8 @@ public class SimulatorTest {
|
||||
SimulationParameters param = new SimulationParametersImpl(course, pd, wf, SailingSimulatorUtil.freestyle);
|
||||
SailingSimulatorImpl sailingSim = new SailingSimulatorImpl(param);
|
||||
|
||||
Map<String, Path> paths = sailingSim.getAllPathsForLeg(new SimulatorUISelectionImpl(0, 0, 0, 0));
|
||||
//Map<String, Path> paths = sailingSim.getAllPathsForLeg(new SimulatorUISelectionImpl(0, 0, 0, 0));
|
||||
Map<String, Path> paths = sailingSim.getAllPaths();
|
||||
|
||||
System.out.println("opportunistic path points: "+paths.get("2#Opportunistic").getPathPoints().size());
|
||||
System.out.println("omnciscient path points: "+paths.get("1#Omniscient").getPathPoints().size());
|
||||
|
||||
+6
-6
@@ -171,8 +171,8 @@ public class WindFieldGeneratorTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWindFieldGeneratorBlast() {
|
||||
//@Test
|
||||
/*public void testWindFieldGeneratorBlast() {
|
||||
Position start = new DegreePosition(54.32447456461419, 10.15613079071045);
|
||||
Position end = new DegreePosition(54.32877915239163, 10.156173706054688);
|
||||
List<Position> course = new LinkedList<Position>();
|
||||
@@ -198,9 +198,9 @@ public class WindFieldGeneratorTest {
|
||||
|
||||
SpeedWithBearing speed = new KilometersPerHourSpeedWithBearingImpl(0, new DegreeBearingImpl(0));
|
||||
|
||||
/*
|
||||
* Check the speed & angle at the start time
|
||||
*/
|
||||
//
|
||||
// Check the speed & angle at the start time
|
||||
//
|
||||
List<Wind> windList = new ArrayList<Wind>();
|
||||
for (int i = 0; i < vSteps; ++i) {
|
||||
for (int j = 0; j < hSteps; ++j) {
|
||||
@@ -213,7 +213,7 @@ public class WindFieldGeneratorTest {
|
||||
//double epsilon = 1e-6;
|
||||
// Check the speed
|
||||
assertEquals("StartTime First Wind Speed ", 10, windList.get(0).getKnots(), 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Test
|
||||
public void testWindFieldGeneratorCombinedNoBlast() {
|
||||
|
||||
-255
@@ -1,255 +0,0 @@
|
||||
package com.sap.sailing.simulator.test.util;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.FilenameFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.Leg;
|
||||
import com.sap.sailing.domain.base.SpeedWithBearing;
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.common.dto.PositionDTO;
|
||||
import com.sap.sailing.domain.common.impl.DegreePosition;
|
||||
import com.sap.sailing.domain.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.tracking.GPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.Wind;
|
||||
import com.sap.sailing.gwt.ui.server.SimulatorServiceImpl;
|
||||
import com.sap.sailing.gwt.ui.shared.ConfigurationException;
|
||||
import com.sap.sailing.gwt.ui.shared.RequestTotalTimeDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.ResponseTotalTimeDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorUISelectionDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorWindDTO;
|
||||
import com.sap.sailing.simulator.TimedPositionWithSpeed;
|
||||
import com.sap.sailing.simulator.impl.PathImpl;
|
||||
import com.sap.sailing.simulator.impl.TimedPositionWithSpeedImpl;
|
||||
|
||||
public class TimeComparison {
|
||||
|
||||
private static final String RESOURCES = "resources/";
|
||||
|
||||
private List<PositionDTO> turnPoints = null;
|
||||
private List<SimulatorWindDTO> allPoints = null;
|
||||
|
||||
private Map<Integer, String> boatClassesIndexes = null;
|
||||
// private Map<Integer, String> averageWindFlags = null;
|
||||
// private List<Integer> timeStepMillisecondsSizes = null;
|
||||
private Integer timeStepMilliseconds = 1000;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("Collection of test methods for evaluating simulator race times for calibration.");
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
|
||||
this.boatClassesIndexes = new HashMap<Integer, String>();
|
||||
this.boatClassesIndexes.put(0, "49er");
|
||||
this.boatClassesIndexes.put(1, "49er rBethwaite");
|
||||
this.boatClassesIndexes.put(2, "49er ORC");
|
||||
this.boatClassesIndexes.put(3, "49er STG");
|
||||
this.boatClassesIndexes.put(4, "505 STG");
|
||||
|
||||
/*
|
||||
* this.averageWindFlags = new HashMap<Integer, String>(); this.averageWindFlags.put(0, "default average wind");
|
||||
* this.averageWindFlags.put(1, "real average wind");
|
||||
*/
|
||||
|
||||
/*
|
||||
* this.timeStepMillisecondsSizes = new ArrayList<Integer>(); this.timeStepMillisecondsSizes.add(1000);
|
||||
* this.timeStepMillisecondsSizes.add(1250); this.timeStepMillisecondsSizes.add(1500);
|
||||
* this.timeStepMillisecondsSizes.add(1750); this.timeStepMillisecondsSizes.add(2000);
|
||||
*/
|
||||
}
|
||||
|
||||
public void runSimulation() throws Exception {
|
||||
|
||||
File dir = getFile("");
|
||||
String[] flist = dir.list(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File dir, String filename) {
|
||||
return filename.endsWith(".data");
|
||||
}
|
||||
});
|
||||
|
||||
TracTracReader ttreader = new TracTracReaderFromFiles(flist);
|
||||
|
||||
List<TrackedRace> lst = ttreader.read();
|
||||
|
||||
// List<String> csvRows = new ArrayList<String>();
|
||||
|
||||
BufferedWriter outputCSV = new BufferedWriter(new FileWriter(
|
||||
getFile("test.csv")));
|
||||
String header = "Event, Race, Competitor, Leg#, Leg, GPS time";
|
||||
|
||||
for (String pd : boatClassesIndexes.values()) {
|
||||
header += ", " + pd;
|
||||
}
|
||||
header += ", Avg Wind Speed, Avg Wind Bearing, Avg Boat Speed, Avg Boat Bearing";
|
||||
|
||||
outputCSV.write(header);
|
||||
outputCSV.newLine();
|
||||
|
||||
for (TrackedRace tr : lst) {
|
||||
|
||||
// String csvLine = "";
|
||||
// System.out.println(tr.getRace().getBoatClass());;
|
||||
RegattaAndRaceIdentifier id = tr.getRaceIdentifier();
|
||||
Iterable<Competitor> competitors = tr.getRace().getCompetitors();
|
||||
List<Leg> legs = tr.getRace().getCourse().getLegs();
|
||||
// System.out.println(legs);
|
||||
// System.out.println(id.getRaceName() + "/" + id.getRegattaName());
|
||||
|
||||
int competitorIndex = -1;
|
||||
for (Competitor competitor : competitors) {
|
||||
competitorIndex++;
|
||||
GPSFixTrack<Competitor, GPSFixMoving> track = tr.getTrack(competitor);
|
||||
track.lockForRead();
|
||||
Iterator<GPSFixMoving> it = track.getFixes().iterator();
|
||||
|
||||
int legIndex = -1;
|
||||
for (Leg leg : legs) {
|
||||
legIndex++;
|
||||
List<TimedPositionWithSpeed> polylinePoints = new ArrayList<TimedPositionWithSpeed>();
|
||||
MarkPassing mp = tr.getMarkPassing(competitor, leg.getTo());
|
||||
GPSFixMoving current;
|
||||
while (mp.getTimePoint().after((current = it.next()).getTimePoint())) {
|
||||
|
||||
Position currentPosition = current.getPosition();
|
||||
TimePoint currentTime = current.getTimePoint();
|
||||
SpeedWithBearing currentSpeed = current.getSpeed();
|
||||
TimedPositionWithSpeed currentTPWS = new TimedPositionWithSpeedImpl(currentTime,
|
||||
currentPosition, currentSpeed);
|
||||
polylinePoints.add(currentTPWS);
|
||||
|
||||
}
|
||||
allPoints = new ArrayList<SimulatorWindDTO>();
|
||||
List<TimedPositionWithSpeed> turns = (new PathImpl(polylinePoints, null)).getTurns();
|
||||
turnPoints = new ArrayList<PositionDTO>();
|
||||
boolean isTurn = false;
|
||||
Position position = null;
|
||||
TimePoint timePoint = null;
|
||||
Wind wind = null;
|
||||
|
||||
for (TimedPositionWithSpeed point : polylinePoints) {
|
||||
isTurn = false;
|
||||
position = point.getPosition();
|
||||
timePoint = point.getTimePoint();
|
||||
wind = tr.getWind(position, timePoint);
|
||||
for (TimedPositionWithSpeed turn : turns) {
|
||||
if (turn.getPosition().getLatDeg() == point.getPosition().getLatDeg()
|
||||
&& turn.getPosition().getLngDeg() == point.getPosition().getLngDeg()
|
||||
&& turn.getTimePoint().asMillis() == point.getTimePoint().asMillis()
|
||||
&& turn.getSpeed().getKnots() == point.getSpeed().getKnots()
|
||||
&& turn.getSpeed().getBearing().getDegrees() == point.getSpeed().getBearing()
|
||||
.getDegrees()) {
|
||||
isTurn = true;
|
||||
turnPoints.add(new PositionDTO(position.getLatDeg(), position.getLngDeg()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
allPoints.add(new SimulatorWindDTO(position.getLatDeg(), position.getLngDeg(), wind.getKnots(),
|
||||
wind.getBearing().getDegrees(), timePoint.asMillis(), isTurn));
|
||||
// end polylinePoints loop
|
||||
}
|
||||
|
||||
// getTotalTime(0, 0, 1000);
|
||||
// System.out.println(getSummary(id, competitor, leg));
|
||||
outputCSV.write(getSummary(id, competitor, leg, competitorIndex, legIndex));
|
||||
outputCSV.newLine();
|
||||
|
||||
// end legs loop
|
||||
}
|
||||
|
||||
// end competitors loop
|
||||
}
|
||||
|
||||
// end tracked races loop
|
||||
}
|
||||
|
||||
outputCSV.close();
|
||||
// end method
|
||||
}
|
||||
|
||||
/*
|
||||
* private void getTotalTime(final int boatClassIndex, final int useRealAverageWindSpeed, final int
|
||||
* stepDurationMilliseconds) throws ConfigurationException {
|
||||
*
|
||||
* final SimulatorServiceImpl simulatorService = new SimulatorServiceImpl(); final RequestTotalTimeDTO requestData =
|
||||
* new RequestTotalTimeDTO(boatClassIndex, this.allPoints, this.turnPoints, useRealAverageWindSpeed == 1,
|
||||
* stepDurationMilliseconds, true); final ResponseTotalTimeDTO receiveData =
|
||||
* simulatorService.getTotalTime_new(requestData);
|
||||
*
|
||||
* final SpeedWithBearing averageWind = simulatorService.getAverageWind(); final double stepSizeMeters =
|
||||
* simulatorService.getStepSizeMeters(); int stepIndex = 0;
|
||||
*
|
||||
* System.err.println("==================================================");
|
||||
* System.err.println(this.boatClassesIndexes.get(boatClassIndex)); System.err.println("average wind speed = " +
|
||||
* averageWind.getKnots() + " knots, bearing = " + averageWind.getBearing().getDegrees() + " degrees");
|
||||
* System.err.println("step size = " + stepSizeMeters + " meters"); stepIndex = 0; for (final Quadruple<PositionDTO,
|
||||
* PositionDTO, Double, Double> segment : receiveData.segments) { System.err.println("segment " + stepIndex +
|
||||
* " from [" + segment.getA().latDeg + "," + segment.getA().lngDeg + "] to [" + segment.getB().latDeg + "," +
|
||||
* segment.getB().lngDeg + "], length = " + segment.getC() + " meters, time = " + segment.getD() / 1000. +
|
||||
* " seconds"); stepIndex++; } System.err.println(this.boatClassesIndexes.get(boatClassIndex) + ", " +
|
||||
* this.averageWindFlags.get(useRealAverageWindSpeed) + ", " + stepDurationMilliseconds +
|
||||
* "milliseconds timestep, total time: " + receiveData.totalTimeSeconds + " seconds");
|
||||
* System.err.println("=================================================="); }
|
||||
*/
|
||||
|
||||
private String getSummary(final RegattaAndRaceIdentifier id, final Competitor competitor, final Leg leg,
|
||||
int competitorIndex, final int legIndex) throws ConfigurationException {
|
||||
|
||||
int noPoints = this.allPoints.size();
|
||||
long finishTime = this.allPoints.get(noPoints - 1).timepoint;
|
||||
long startTime = this.allPoints.get(0).timepoint;
|
||||
double gpsTime = (finishTime - startTime) / 1000.0;
|
||||
long totalDistanceMeters = 0;
|
||||
Iterator<SimulatorWindDTO> it = this.allPoints.iterator();
|
||||
SimulatorWindDTO prec = it.next();
|
||||
SimulatorWindDTO succ = null;
|
||||
double avgBearing = 0.0;
|
||||
while (it.hasNext()) {
|
||||
succ = it.next();
|
||||
Position p1 = new DegreePosition(prec.position.latDeg, prec.position.lngDeg);
|
||||
Position p2 = new DegreePosition(succ.position.latDeg, succ.position.lngDeg);
|
||||
totalDistanceMeters += p2.getDistance(p1).getMeters();
|
||||
avgBearing += 1.0 / noPoints * p1.getBearingGreatCircle(p2).getDegrees();
|
||||
prec = succ;
|
||||
}
|
||||
double speedMetersPerSecond = totalDistanceMeters / gpsTime;
|
||||
double speedKnots = speedMetersPerSecond * 1.94;
|
||||
String result = "";
|
||||
result = id.getRegattaName() + ", " + id.getRaceName();
|
||||
result += ", " + competitor.getName() + ", " + legIndex + ", " + leg.toString() + ", " + gpsTime;
|
||||
|
||||
SpeedWithBearing averageWind = null;
|
||||
|
||||
for (Integer boatClassIndex : boatClassesIndexes.keySet()) {
|
||||
final SimulatorServiceImpl simulatorService = new SimulatorServiceImpl();
|
||||
final RequestTotalTimeDTO requestData = new RequestTotalTimeDTO(new SimulatorUISelectionDTO(boatClassIndex, 0, competitorIndex, legIndex),
|
||||
this.timeStepMilliseconds, this.allPoints, this.turnPoints, true);
|
||||
|
||||
final ResponseTotalTimeDTO receiveData = simulatorService.getTotalTime(requestData);
|
||||
averageWind = simulatorService.getAverageWind();
|
||||
result += ", " + receiveData.totalTimeSeconds;
|
||||
}
|
||||
result += ", " + averageWind.getKnots() + ", " + averageWind.getBearing();
|
||||
result += ", " + speedKnots + ", " + avgBearing;
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private File getFile(String fileName) {
|
||||
return new File(RESOURCES + fileName);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
|
||||
public class TestTracTracReader {
|
||||
public class TracTracReaderExample {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.sap.sailing.simulator.test.util;
|
||||
|
||||
|
||||
public class TestTracTracWriter {
|
||||
public class TracTracWriterExample {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
+1
-1
@@ -391,7 +391,7 @@ public class SailingSimulatorImpl implements SailingSimulator {
|
||||
} else {
|
||||
throw new Exception("Unknown path name!");
|
||||
}
|
||||
SimulatorUtils.saveToFile(path, SimulatorUtils.getPathPrefix() + "\\src\\resources\\" + fileName);
|
||||
SimulatorUtils.saveToFile(path, SimulatorUtils.getPathPrefix() + "\\resources\\" + fileName);
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
+6
-6
@@ -101,11 +101,11 @@ public class SimulatorUtils {
|
||||
boolean result = true;
|
||||
|
||||
for (String name : PATH_NAMES) {
|
||||
filePath = pathPrefix + "\\src\\resources\\" + name + ".dat";
|
||||
filePath = pathPrefix + "\\resources\\" + name + ".dat";
|
||||
result &= saveToFile(paths.get(name), filePath);
|
||||
}
|
||||
|
||||
filePath = pathPrefix + "\\src\\resources\\" + RACECOURSE_DAT;
|
||||
filePath = pathPrefix + "\\resources\\" + RACECOURSE_DAT;
|
||||
result &= saveToFile(raceCourse, filePath);
|
||||
|
||||
return result;
|
||||
@@ -133,13 +133,13 @@ public class SimulatorUtils {
|
||||
|
||||
fileName = SimulatorUtils.getFileName(selectedRaceIndex, selectedCompetitorIndex, selectedLegIndex,
|
||||
name);
|
||||
filePath = pathPrefix + "\\src\\resources\\" + fileName;
|
||||
filePath = pathPrefix + "\\resources\\" + fileName;
|
||||
result &= saveToFile(paths.get(name), filePath);
|
||||
}
|
||||
|
||||
fileName = SimulatorUtils.getFileName(selectedRaceIndex, selectedCompetitorIndex, selectedLegIndex,
|
||||
"racecourse");
|
||||
filePath = pathPrefix + "\\src\\resources\\" + fileName;
|
||||
filePath = pathPrefix + "\\resources\\" + fileName;
|
||||
result &= saveToFile(raceCourse, filePath);
|
||||
|
||||
return result;
|
||||
@@ -179,7 +179,7 @@ public class SimulatorUtils {
|
||||
|
||||
fileName = SimulatorUtils.getFileName(selectedRaceIndex, selectedCompetitorIndex, selectedLegIndex,
|
||||
pathName);
|
||||
filePath = "resources/" + fileName;
|
||||
filePath = fileName;
|
||||
|
||||
path = (Path) readObjectFromResources(filePath);
|
||||
if (path == null) {
|
||||
@@ -295,7 +295,7 @@ public class SimulatorUtils {
|
||||
pathPrefix = getPathPrefix();
|
||||
}
|
||||
|
||||
String filePath = pathPrefix + "\\src\\resources\\" + fileName;
|
||||
String filePath = pathPrefix + "\\resources\\" + fileName;
|
||||
|
||||
boolean result = true;
|
||||
|
||||
|
||||
@@ -86,9 +86,7 @@
|
||||
<module>net.sf.marineapi</module>
|
||||
<module>net.sf.marineapi.test</module>
|
||||
<module>com.sap.sailing.simulator</module>
|
||||
<!-- While simulator tests fail massively, this remains commented out
|
||||
<module>com.sap.sailing.simulator.test</module>
|
||||
-->
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
Reference in New Issue
Block a user