mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 19:33:52 +00:00
Merge remote-tracking branch 'origin/master' into leaderboard_json_with_max_competitors
This commit is contained in:
commit
17cbf6bf65
19 files changed
+130
-84
No files matched your search
@@ -346,6 +346,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
|
||||
cp -v $PROJECT_HOME/java/target/env.sh $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/start $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/stop $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/status $ACDIR/
|
||||
fi
|
||||
|
||||
if [ ! -f $ACDIR/no-overwrite ]; then
|
||||
@@ -360,6 +361,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
|
||||
cp -v $PROJECT_HOME/java/target/env.sh $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/start $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/stop $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/status $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/udpmirror $ACDIR/
|
||||
|
||||
cp -v $PROJECT_HOME/java/target/http2udpmirror $ACDIR
|
||||
|
||||
+2
-2
@@ -134,13 +134,13 @@ public class WindEstimationOnConstructedTracksTest extends StoredTrackBasedTest
|
||||
assertEquals(180., estimatedWindDirection.getBearing().getDegrees(), 0.00000001);
|
||||
CombinedWindTrackImpl combinedTrack = new CombinedWindTrackImpl(getTrackedRace(), WindSourceType.COMBINED.getBaseConfidence());
|
||||
Wind combinedWindDirection = combinedTrack.getAveragedWind(/* position */ null, now);
|
||||
//Since the course layout makes a wind estimation around 7° and the confidence of the cluster based wind estimation is not
|
||||
//Since the course layout makes a wind estimation around 7� and the confidence of the cluster based wind estimation is not
|
||||
// way higher that that of the course layout wind, we will not end up with exactly 180 deg.
|
||||
assertEquals(180.2, combinedWindDirection.getBearing().getDegrees(), 0.1);
|
||||
}
|
||||
|
||||
/**
|
||||
* See <a href="http://sapcoe-app01.pironet-ndh.com/show_bug.cgi?id=166">bug #166</a>
|
||||
* See <a href="http://bugzilla.sapsailing.com/bugzilla/show_bug.cgi?id=166">bug #166</a>
|
||||
*/
|
||||
@Test
|
||||
public void testWindEstimationCacheInvalidationAfterLegTypeChange() throws NoWindException {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>PRE- WORLD 2012 - COUPE INTERNATIONALE DE FRANCE 505</title>
|
||||
<!-- base href="http://sapcoe-app01.pironet-ndh.com/p2/results505/pre_world_505_s.htm" -->
|
||||
<!-- base href="http://p2.sapsailing.com/p2/results505/pre_world_505_s.htm" -->
|
||||
<meta name="DESCRIPTION" content="Classement general PRE- WORLD 2012 - COUPE INTERNATIONALE DE FRANCE 505">
|
||||
<meta name="KEYWORDS" content="freg,freg2011,freg2007,freg2009,regate,voile,voilier,resultats,470,420,laser,optimist,catamaran,planche a voile,49er,quillard">
|
||||
|
||||
|
||||
+10
-1
@@ -230,7 +230,7 @@ public abstract class AbstractChartPanel<SettingsType extends ChartSettings> ext
|
||||
hideLoading();
|
||||
|
||||
if (result != null) {
|
||||
if (result.isEmpty()) {
|
||||
if (result.isEmpty() && chartContainsNoData()) {
|
||||
setWidget(noDataFoundLabel);
|
||||
} else {
|
||||
updateChartSeries(result, append);
|
||||
@@ -253,6 +253,15 @@ public abstract class AbstractChartPanel<SettingsType extends ChartSettings> ext
|
||||
asyncActionsExecutor.execute(getCompetitorsRaceDataAction);
|
||||
|
||||
}
|
||||
|
||||
private boolean chartContainsNoData() {
|
||||
for (Series competitorSeries : dataSeriesByCompetitor.values()) {
|
||||
if (competitorSeries.getPoints().length != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addedToSelection(CompetitorDTO competitor) {
|
||||
|
||||
+4
-10
@@ -42,7 +42,6 @@ public class WindFieldGenParamsDTO implements IsSerializable {
|
||||
|
||||
|
||||
public WindFieldGenParamsDTO() {
|
||||
setDefaultTimeSettings();
|
||||
}
|
||||
|
||||
public PositionDTO getNorthWest() {
|
||||
@@ -101,15 +100,10 @@ public class WindFieldGenParamsDTO implements IsSerializable {
|
||||
this.timeStep = timeStep;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setDefaultTimeSettings() {
|
||||
startTime = new Date();// new Date(0);
|
||||
startTime.setHours(0);
|
||||
startTime.setMinutes(0);
|
||||
startTime.setSeconds(0);
|
||||
|
||||
timeStep = new Date(20 * 1000);
|
||||
endTime = new Date(startTime.getTime() + 10 * 60 * 1000);
|
||||
public void setDefaultTimeSettings(Date startTime, Date timeStep, Date endTime) {
|
||||
this.startTime = startTime;
|
||||
this.timeStep = timeStep;
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public char getMode() {
|
||||
|
||||
+4
-2
@@ -119,8 +119,10 @@ public abstract class FullCanvasOverlay extends CanvasOverlay {
|
||||
context2d.setGlobalAlpha(1.0f);
|
||||
if (getMap().getZoomLevel() >= 11) {
|
||||
context2d.setFillStyle(textColor);
|
||||
context2d.setFont("normal 12pt Calibri");
|
||||
context2d.fillText(text, x + 10., y + 4.);
|
||||
double fontsize = 9.0 + (12.0-9.0)*(getMap().getZoomLevel() - 10.0)/(12.0-10.0);
|
||||
context2d.setFont("normal "+fontsize+"px Calibri");
|
||||
context2d.fillText(text, x + 0.7*fontsize, y + 0.3*fontsize);
|
||||
//System.out.println("ZoomLevel: "+getMap().getZoomLevel()+", Fontsize: "+fontsize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -27,6 +27,9 @@ public class WindPatternDisplayManagerImpl implements WindPatternDisplayManager
|
||||
this.setMode(mode);
|
||||
List<WindPatternDTO> list = new ArrayList<WindPatternDTO>();
|
||||
for (WindPattern w : WindPattern.values()) {
|
||||
if (((w == WindPattern.MEASURED)||(w == WindPattern.NONE))&&(mode == SailingSimulatorUtil.event)) {
|
||||
continue;
|
||||
}
|
||||
list.add(new WindPatternDTO(w.name(), w.getDisplayName()));
|
||||
}
|
||||
return list;
|
||||
@@ -57,6 +60,14 @@ public class WindPatternDisplayManagerImpl implements WindPatternDisplayManager
|
||||
}
|
||||
|
||||
private void addBlastParameters(WindPatternDisplay display) {
|
||||
if (mode == SailingSimulatorUtil.event) {
|
||||
WindPatternSetting<Double> windBearingSetting = new WindPatternSettingSliderBar("windBearing",
|
||||
"Base Bearing (Degrees)", 0, 360, 0, 36);
|
||||
display.addSetting(windBearingSetting);
|
||||
WindPatternSetting<Double> baseWindBearing = new WindPatternSettingSliderBar("baseWindBearing",
|
||||
"Race Course Diff (Degrees)", -20, 20, 0,10);
|
||||
display.addSetting(baseWindBearing);
|
||||
}
|
||||
WindPatternSetting<Double> windSpeedSetting = new WindPatternSettingSliderBar("baseWindSpeed",
|
||||
"Base Speed (kn)", 2, 22, 12,10);
|
||||
display.addSetting(windSpeedSetting);
|
||||
|
||||
+6
-8
@@ -61,8 +61,8 @@ public class PathCanvasOverlay extends WindFieldCanvasOverlay implements Named {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public PathCanvasOverlay(String name, Timer timer) {
|
||||
super(timer);
|
||||
public PathCanvasOverlay(String name, Timer timer, WindFieldGenParamsDTO windParams) {
|
||||
super(timer, windParams);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -81,15 +81,15 @@ public class PathCanvasOverlay extends WindFieldCanvasOverlay implements Named {
|
||||
this.pathColor = color;
|
||||
}
|
||||
|
||||
public PathCanvasOverlay(String name, Timer timer, long totalTimeMilliseconds) {
|
||||
super(timer);
|
||||
public PathCanvasOverlay(String name, Timer timer, WindFieldGenParamsDTO windParams, long totalTimeMilliseconds) {
|
||||
super(timer, windParams);
|
||||
this.name = name;
|
||||
this.totalTimeIsGiven = true;
|
||||
this.totalTimeMilliseconds = totalTimeMilliseconds;
|
||||
}
|
||||
|
||||
public PathCanvasOverlay(String name, Timer timer, long totalTimeMilliseconds, String color) {
|
||||
super(timer);
|
||||
public PathCanvasOverlay(String name, Timer timer, WindFieldGenParamsDTO windParams, long totalTimeMilliseconds, String color) {
|
||||
super(timer, windParams);
|
||||
this.name = name;
|
||||
this.totalTimeIsGiven = true;
|
||||
this.totalTimeMilliseconds = totalTimeMilliseconds;
|
||||
@@ -154,8 +154,6 @@ public class PathCanvasOverlay extends WindFieldCanvasOverlay implements Named {
|
||||
context2d.fillText(cText, cX-(timewidth/2.0), cY-25);
|
||||
}
|
||||
|
||||
WindFieldGenParamsDTO windParams = new WindFieldGenParamsDTO();
|
||||
|
||||
int numPoints = windDTOList.size();
|
||||
if (numPoints < 1) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -275,7 +275,7 @@ public class RegattaAreaCanvasOverlay extends FullCanvasOverlay {
|
||||
context2d.setFillStyle(colorText);
|
||||
|
||||
double fontsize = 14.0 + (32.0-14.0)*(getMap().getZoomLevel() - 11.0)/(14.0-11.0);
|
||||
context2d.setFont("bold "+fontsize+"px Calibri");
|
||||
context2d.setFont("normal "+fontsize+"px Calibri");
|
||||
//TextMetrics txtmet = context2d.measureText(name);
|
||||
context2d.setTextAlign(TextAlign.CENTER);
|
||||
context2d.fillText(name, centerPoint.getX() - this.getWidgetPosLeft(), centerPoint.getY()+0.32*fontsize - this.getWidgetPosTop());
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.gwt.ui.client.Timer;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorWindDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldGenParamsDTO;
|
||||
|
||||
public class ReplayPathCanvasOverlay extends PathCanvasOverlay {
|
||||
|
||||
@@ -14,8 +15,8 @@ public class ReplayPathCanvasOverlay extends PathCanvasOverlay {
|
||||
private static Logger logger = Logger.getLogger(ReplayPathCanvasOverlay.class.getName());
|
||||
private List<SimulatorWindDTO> windDTOToDraw;
|
||||
|
||||
public ReplayPathCanvasOverlay(final String name, final Timer timer) {
|
||||
super(name, timer);
|
||||
public ReplayPathCanvasOverlay(final String name, final Timer timer, WindFieldGenParamsDTO windParams) {
|
||||
super(name, timer, windParams);
|
||||
this.displayWindAlongPath = false;
|
||||
windDTOToDraw = null;
|
||||
//this.timer.addTimeListener(this);
|
||||
|
||||
+44
-42
@@ -21,6 +21,7 @@ import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
@@ -38,6 +39,7 @@ import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.Panel;
|
||||
import com.google.gwt.user.client.ui.PopupPanel.PositionCallback;
|
||||
import com.google.gwt.user.client.ui.RadioButton;
|
||||
import com.google.gwt.user.client.ui.RequiresResize;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.sap.sailing.domain.common.dto.BoatClassDTO;
|
||||
@@ -63,9 +65,18 @@ import com.sap.sailing.simulator.util.SailingSimulatorUtil;
|
||||
|
||||
public class SimulatorMainPanel extends SimplePanel {
|
||||
|
||||
private class resizableFlowPanel extends FlowPanel implements RequiresResize {
|
||||
|
||||
@Override
|
||||
public void onResize() {
|
||||
simulatorMap.getMap().checkResizeAndCenter();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private DockLayoutPanel mainPanel;
|
||||
private FlowPanel leftPanel;
|
||||
private FlowPanel rightPanel;
|
||||
private resizableFlowPanel rightPanel;
|
||||
private VerticalPanel windPanel;
|
||||
|
||||
private Button updateButton;
|
||||
@@ -100,8 +111,6 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
private StringMessages stringMessages;
|
||||
private SimulatorServiceAsync simulatorSvc;
|
||||
private ErrorReporter errorReporter;
|
||||
private int xRes;
|
||||
private int yRes;
|
||||
private boolean autoUpdate;
|
||||
private char mode;
|
||||
|
||||
@@ -221,8 +230,6 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
this.simulatorSvc = svc;
|
||||
this.stringMessages = stringMessages;
|
||||
this.errorReporter = errorReporter;
|
||||
this.xRes = xRes;
|
||||
this.yRes = yRes;
|
||||
this.autoUpdate = autoUpdate;
|
||||
this.mode = mode;
|
||||
this.isOmniscient = new CheckBox(this.stringMessages.omniscient(), true);
|
||||
@@ -237,7 +244,7 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
this.setSize("100%", "100%");
|
||||
|
||||
leftPanel = new FlowPanel();
|
||||
rightPanel = new FlowPanel();
|
||||
rightPanel = new resizableFlowPanel();
|
||||
patternSelector = new ListBox();
|
||||
patternSelectorHandler = new PatternSelectorHandler();
|
||||
patternSelector.addChangeHandler(patternSelectorHandler);
|
||||
@@ -262,6 +269,7 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
|
||||
directionSelector = new ListBox();
|
||||
directionSelector.getElement().getStyle().setProperty("width", "215px");
|
||||
|
||||
windParams = new WindFieldGenParamsDTO();
|
||||
windParams.setMode(mode);
|
||||
windParams.setShowArrows(showArrows);
|
||||
@@ -269,9 +277,9 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
windParams.setShowLines(showLines);
|
||||
windParams.setSeedLines(seedLines);
|
||||
windParams.setShowStreamlets(showStreamlets);
|
||||
this.setDefaultTimeSettings();
|
||||
|
||||
timer = new Timer(PlayModes.Replay, 1000l);
|
||||
|
||||
TimeRangeWithZoomProvider timeRangeProvider = new TimeRangeWithZoomModel();
|
||||
initTimer();
|
||||
timer.setTime(windParams.getStartTime().getTime());
|
||||
@@ -287,16 +295,26 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
// logoAndTitlePanel.addStyleName("LogoAndTitlePanel");
|
||||
// this.addNorth(logoAndTitlePanel, 68);
|
||||
|
||||
simulatorMap = new SimulatorMap(simulatorSvc, stringMessages, errorReporter, xRes, yRes, timer, timePanel,
|
||||
windParams, busyIndicator, mode, this);
|
||||
simulatorMap.setSize("100%", "100%");
|
||||
|
||||
this.rightPanel.add(this.simulatorMap);
|
||||
|
||||
createOptionsPanelTop();
|
||||
createOptionsPanel();
|
||||
createMapOptionsPanel();
|
||||
|
||||
fullTimePanel = this.createTimePanel();
|
||||
|
||||
mainPanel = new DockLayoutPanel(Unit.PX);
|
||||
|
||||
mainPanel.setSize("100%", "100%");
|
||||
mainPanel.addWest(leftPanel, 470);
|
||||
mainPanel.addSouth(fullTimePanel, 90);
|
||||
mainPanel.setWidgetHidden(fullTimePanel, true);
|
||||
|
||||
createMapOptionsPanel(); // add map-options to mainPanel-North
|
||||
|
||||
mainPanel.add(rightPanel);
|
||||
this.setWidget(mainPanel);
|
||||
|
||||
@@ -304,29 +322,22 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
|
||||
}
|
||||
|
||||
private void showTimePanel(boolean visible) {
|
||||
|
||||
boolean isContained = mainPanel.getWidgetIndex(fullTimePanel) >= 0;
|
||||
|
||||
if (visible) {
|
||||
|
||||
if (!isContained) {
|
||||
fullTimePanel.setVisible(true);
|
||||
mainPanel.insertSouth(fullTimePanel, 90, null);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (isContained) {
|
||||
mainPanel.remove(fullTimePanel);
|
||||
fullTimePanel.setVisible(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
mainPanel.forceLayout();
|
||||
simulatorMap.getMap().checkResizeAndCenter();
|
||||
public void setDefaultTimeSettings() {
|
||||
Date defaultNow = new Date();
|
||||
DateTimeFormat fmt = DateTimeFormat.getFormat("Z");
|
||||
NumberFormat df = NumberFormat.getDecimalFormat();
|
||||
int utcOffSet = (int) df.parse(fmt.format(defaultNow))/100; // default time zone offset versus UTC
|
||||
long epochTime = (defaultNow.getTime()/86400000)*86400000 - utcOffSet*3600000; // today, midnight in default time zone
|
||||
|
||||
Date startTime = new Date(epochTime);
|
||||
Date timeStep = new Date(15 * 1000);
|
||||
Date endTime = new Date(startTime.getTime() + 10 * 60 * 1000);
|
||||
windParams.setDefaultTimeSettings(startTime, timeStep, endTime);
|
||||
}
|
||||
|
||||
public void showTimePanel(boolean visible) {
|
||||
mainPanel.setWidgetHidden(fullTimePanel, !visible);
|
||||
mainPanel.forceLayout(); // trigger onResize() on child panels, relevant for map resize & center
|
||||
}
|
||||
|
||||
private void createOptionsPanelTop() {
|
||||
@@ -395,7 +406,7 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
patternSelector.setItemSelected(patternSelector.getItemCount()-1, true);
|
||||
patternSelectorHandler.onChange(null);
|
||||
} else {
|
||||
patternSelector.setItemSelected(1, true);
|
||||
patternSelector.setItemSelected(0, true);
|
||||
patternSelectorHandler.onChange(null);
|
||||
}
|
||||
}
|
||||
@@ -504,7 +515,8 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
}
|
||||
|
||||
mapOptions.add(busyIndicator);
|
||||
rightPanel.add(mapOptions);
|
||||
//rightPanel.add(mapOptions);
|
||||
mainPanel.addNorth(mapOptions, 45);
|
||||
|
||||
initDisplayOptions(mapOptions);
|
||||
if (mode == SailingSimulatorUtil.event) {
|
||||
@@ -513,16 +525,6 @@ public class SimulatorMainPanel extends SimplePanel {
|
||||
windDisplayButton.setValue(false);
|
||||
}
|
||||
|
||||
simulatorMap = new SimulatorMap(simulatorSvc, stringMessages, errorReporter, xRes, yRes, timer, timePanel,
|
||||
windParams, busyIndicator, mode, this);
|
||||
//simulatorMap.setSize("100%", "100%");
|
||||
//simulatorMap.getElement().getStyle().setProperty("position", "relative");
|
||||
simulatorMap.getElement().getStyle().setProperty("height", "calc(100% - 45px)");
|
||||
simulatorMap.getElement().getStyle().setProperty("width", "100%");
|
||||
//simulatorMap.getElement().getStyle().setProperty("left", "0px");
|
||||
//simulatorMap.getElement().getStyle().setProperty("right", "0px");
|
||||
|
||||
this.rightPanel.add(this.simulatorMap);
|
||||
}
|
||||
|
||||
// initialize timer with a default time span based on windParams
|
||||
|
||||
+7
-6
@@ -136,7 +136,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
WindFieldDTO pathWindDTO = new WindFieldDTO();
|
||||
pathWindDTO.setMatrix(currentPath.getPoints());
|
||||
|
||||
ReplayPathCanvasOverlay replayPathCanvasOverlay = new ReplayPathCanvasOverlay(pathName, timer);
|
||||
ReplayPathCanvasOverlay replayPathCanvasOverlay = new ReplayPathCanvasOverlay(pathName, timer, windParams);
|
||||
replayPathCanvasOverlays.add(replayPathCanvasOverlay);
|
||||
replayPathCanvasOverlay.pathColor = color;
|
||||
|
||||
@@ -350,6 +350,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
regattaAreaCanvasOverlay = new RegattaAreaCanvasOverlay(this);
|
||||
mapw.addOverlay(regattaAreaCanvasOverlay);
|
||||
regattaAreaCanvasOverlay.setVisible(true);
|
||||
//parent.showTimePanel(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,13 +367,13 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
this.mapw.addOverlay(this.raceCourseCanvasOverlay);
|
||||
|
||||
if (this.windParams.isShowArrows()) {
|
||||
this.windFieldCanvasOverlay = new WindFieldCanvasOverlay(this.timer);
|
||||
this.windFieldCanvasOverlay = new WindFieldCanvasOverlay(this.timer, this.windParams);
|
||||
}
|
||||
if (this.windParams.isShowStreamlets()) {
|
||||
this.windStreamletsCanvasOverlay = new WindStreamletsCanvasOverlay(this.timer, this.xRes, this.yRes);
|
||||
}
|
||||
if (this.windParams.isShowGrid()) {
|
||||
this.windGridCanvasOverlay = new WindGridCanvasOverlay(this.timer, this.xRes, this.yRes);
|
||||
this.windGridCanvasOverlay = new WindGridCanvasOverlay(this.timer, this.windParams, this.xRes, this.yRes);
|
||||
}
|
||||
if (windParams.isShowLines()) {
|
||||
this.windLineCanvasOverlay = new WindLineCanvasOverlay(this.timer);
|
||||
@@ -626,12 +627,12 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void refreshWindDisplayView(WindPatternDisplay windPatternDisplay, boolean force) {
|
||||
|
||||
if (force) {
|
||||
// removeOverlays();
|
||||
this.windParams.setDefaultTimeSettings();
|
||||
this.parent.setDefaultTimeSettings();
|
||||
this.generateWindField(windPatternDisplay, true);
|
||||
// timeListeners.clear();
|
||||
// timeListeners.add(windFieldCanvasOverlay);
|
||||
@@ -663,7 +664,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
|
||||
} else {
|
||||
this.windParams.setDefaultTimeSettings();
|
||||
this.parent.setDefaultTimeSettings();
|
||||
this.generateWindField(windPatternDisplay, true);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -21,6 +21,7 @@ import com.sap.sailing.domain.common.impl.DegreeBearingImpl;
|
||||
import com.sap.sailing.gwt.ui.client.Timer;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorWindDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldGenParamsDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.FullCanvasOverlay;
|
||||
import com.sap.sailing.gwt.ui.simulator.util.ToolTip;
|
||||
import com.sap.sailing.gwt.ui.simulator.util.WindFieldMapMouseMoveHandler;
|
||||
@@ -47,14 +48,16 @@ public class WindFieldCanvasOverlay extends FullCanvasOverlay implements TimeLis
|
||||
protected String arrowHeadColor = "Blue";
|
||||
protected WindFieldMapMouseMoveHandler mmHandler;
|
||||
protected double arrowLength = 15;
|
||||
protected WindFieldGenParamsDTO windParams = null;
|
||||
|
||||
private Timer timer;
|
||||
|
||||
private static Logger logger = Logger.getLogger(WindFieldCanvasOverlay.class.getName());
|
||||
|
||||
public WindFieldCanvasOverlay(final Timer timer) {
|
||||
public WindFieldCanvasOverlay(final Timer timer, final WindFieldGenParamsDTO windParams) {
|
||||
super();
|
||||
this.timer = timer;
|
||||
this.windParams = windParams;
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -118,7 +121,7 @@ public class WindFieldCanvasOverlay extends FullCanvasOverlay implements TimeLis
|
||||
|
||||
@Override
|
||||
protected Overlay copy() {
|
||||
return new WindFieldCanvasOverlay(this.timer);
|
||||
return new WindFieldCanvasOverlay(this.timer, this.windParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-2
@@ -24,6 +24,7 @@ import com.sap.sailing.domain.common.impl.Util.Pair;
|
||||
import com.sap.sailing.gwt.ui.client.Timer;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorWindDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldGenParamsDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.FullCanvasOverlay;
|
||||
import com.sap.sailing.gwt.ui.simulator.util.WindGridColorPalette;
|
||||
|
||||
@@ -43,6 +44,7 @@ public class WindGridCanvasOverlay extends FullCanvasOverlay implements TimeList
|
||||
protected SortedMap<Long, List<SimulatorWindDTO>> timePointWindDTOMap;
|
||||
|
||||
protected final Timer timer;
|
||||
protected WindFieldGenParamsDTO windParams = null;
|
||||
|
||||
private int xRes;
|
||||
private int yRes;
|
||||
@@ -96,9 +98,10 @@ public class WindGridCanvasOverlay extends FullCanvasOverlay implements TimeList
|
||||
|
||||
}
|
||||
|
||||
public WindGridCanvasOverlay(final Timer timer, final int xRes, final int yRes) {
|
||||
public WindGridCanvasOverlay(final Timer timer, WindFieldGenParamsDTO windParams, final int xRes, final int yRes) {
|
||||
super();
|
||||
this.timer = timer;
|
||||
this.windParams = windParams;
|
||||
this.xRes = xRes;
|
||||
this.yRes = yRes;
|
||||
init();
|
||||
@@ -198,7 +201,7 @@ public class WindGridCanvasOverlay extends FullCanvasOverlay implements TimeList
|
||||
|
||||
@Override
|
||||
protected Overlay copy() {
|
||||
return new WindFieldCanvasOverlay(this.timer);
|
||||
return new WindFieldCanvasOverlay(this.timer, windParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ public class PathGeneratorTreeGrowWind3 extends PathGeneratorBase {
|
||||
return 0;
|
||||
} else {
|
||||
return (p1.hrz < p2.hrz ? -1 : +1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -563,7 +563,7 @@ public class PathGeneratorTreeGrowWind3 extends PathGeneratorBase {
|
||||
if ((curPath.vrt > 0.0)) {
|
||||
//logger.info("\ntPath: " + curPath.path + "\n Time: " + (Math.round((curPath.pos.getTimePoint().asMillis()-startTime.asMillis())/1000.0/60.0*10.0)/10.0)+", Height: "+curPath.vrt+" of "+(Math.round(startPos.getDistance(endPos).getMeters()*100.0)/100.0)+", Dist: "+curPath.hrz+"m ~ "+(Math.round(curPath.pos.getPosition().getDistance(endPos).getMeters()*100.0)/100.0)+"m");
|
||||
int curBin = (int)Math.round(Math.floor( (curPath.hrz + hrzBinSize/2.0) / hrzBinSize ));
|
||||
if ((Math.abs(curBin) <= 2)) {
|
||||
if ((Math.abs(curBin) <= 1)) {
|
||||
reachedEnd = true;
|
||||
trgPaths.add(curPath); // add path to list of target-paths
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<unit id="com.sap.sailing.target.jsp.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.test.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.restlet.feature.group" version="1.0.0"/>
|
||||
<repository location="http://sapcoe-app01.pironet-ndh.com/p2/sailing/"/>
|
||||
<repository location="http://p2.sapsailing.com/p2/sailing/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.7.1.R37x_v20110907-7uF9LFpFFSuN6-tKJIXPMYaq7NTP"/>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
<unit id="com.sap.sailing.target.jsp.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.jms.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.restlet.feature.group" version="1.0.0"/>
|
||||
<repository location="http://sapcoe-app01.pironet-ndh.com/p2/sailing/"/>
|
||||
<repository location="http://p2.sapsailing.com/p2/sailing/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.7.1.R37x_v20110907-7uF9LFpFFSuN6-tKJIXPMYaq7NTP"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<unit id="com.sap.sailing.target.jms.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.jsp.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.restlet.feature.group" version="1.0.0"/>
|
||||
<repository location="http://sapcoe-app01.pironet-ndh.com/p2/sailing/"/>
|
||||
<repository location="http://p2.sapsailing.com/p2/sailing/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.jetty.bundles.f.feature.group" version="7.5.4"/>
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# source variables
|
||||
. `pwd`/env.sh
|
||||
|
||||
TELNET_ACTIVE=`netstat -tlnp 2>/dev/null | grep ":$SERVER_PORT"`
|
||||
if [[ $TELNET_ACTIVE != "" ]]; then
|
||||
echo "Server $SERVER_NAME is running on $SERVER_PORT (or some other daemon)"
|
||||
echo "Configuration for this server is:"
|
||||
echo "SERVER_NAME: $SERVER_NAME"
|
||||
echo "SERVER_PORT: $SERVER_PORT"
|
||||
echo "MEMORY: $MEMORY"
|
||||
echo "TELNET_PORT: $TELNET_PORT"
|
||||
echo "MONGODB_PORT: $MONGODB_PORT"
|
||||
echo "EXPEDITION_PORT: $EXPEDITION_PORT"
|
||||
echo "REPLICATION_CHANNEL: $REPLICATION_CHANNEL"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Server $SERVER_NAME is not running."
|
||||
Reference in new issue
Block a user