diff --git a/java/com.sap.sailing.gwt.ui/.settings/com.google.gwt.eclipse.core.prefs b/java/com.sap.sailing.gwt.ui/.settings/com.google.gwt.eclipse.core.prefs
index ee4cd4254c9..9ecd5a1964c 100755
--- a/java/com.sap.sailing.gwt.ui/.settings/com.google.gwt.eclipse.core.prefs
+++ b/java/com.sap.sailing.gwt.ui/.settings/com.google.gwt.eclipse.core.prefs
@@ -1,5 +1,4 @@
-#Thu Feb 02 18:41:06 CET 2012
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
-gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgLiAtbG9jYWxXb3JrZXJzIDMgLXN0cmljdCAtbG9nTGV2ZWwgVFJBQ0VdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDEwMjRtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zYWlsaW5nLmd3dC51aS5BZG1pbkNvbnNvbGU8L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc2FpbGluZy5nd3QudWkuTGVhZGVyYm9hcmQ8L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc2FpbGluZy5nd3QudWkuTGVhZGVyYm9hcmRFZGl0aW5nPC9lbnRyeS1wb2ludC1tb2R1bGU+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20uc2FwLnNhaWxpbmcuZ3d0LnVpLlJhY2VCb2FyZDwvZW50cnktcG9pbnQtbW9kdWxlPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zYWlsaW5nLmd3dC51aS5TcGVjdGF0b3I8L2VudHJ5LXBvaW50LW1vZHVsZT48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5zYXAuc2FpbGluZy5nd3QudWkuVXNlck1hbmFnZW1lbnQ8L2VudHJ5LXBvaW50LW1vZHVsZT48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\=
+gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+UFJFVFRZPC9vdXRwdXQtc3R5bGU+PGV4dHJhLWFyZ3M+PCFbQ0RBVEFbLXdhciAuIC1sb2NhbFdvcmtlcnMgMyAtc3RyaWN0IC1sb2dMZXZlbCBUUkFDRV1dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14MTAyNG1dXT48L3ZtLWFyZ3M+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20uc2FwLnNhaWxpbmcuZ3d0LnVpLlNpbXVsYXRvcjwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
diff --git a/java/com.sap.sailing.gwt.ui/Simulator.css b/java/com.sap.sailing.gwt.ui/Simulator.css
new file mode 100644
index 00000000000..6abaac1e894
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/Simulator.css
@@ -0,0 +1,250 @@
+@import url(fontface.css);
+
+/** Add css rules here for your application. */
+/*
+ body #calendar:after
+ content: " ";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+*/
+.clear {
+ clear: both;
+ font-size: 1px;
+ height: 0px;
+ line-height: 0px;
+ margin: -1px 0 0;
+ width: 100%;
+}
+
+.cover {
+ left: -1000px;
+ overflow: hidden;
+ position: absolute;
+ top: -1000px;
+}
+
+body {
+ background: #ebebeb;
+ font-family: 'UbuntuRegular', Arial, Verdana, sans-serif;
+ line-height: 1;
+ font-size: 14px;
+ font-weight: 400;
+ padding: 80px 0 160px 0;
+ margin: 0;
+ color: #3b3b3b;
+}
+
+table td,select,button {
+ font-family: 'UbuntuLight', Arial, Verdana, sans-serif;
+ line-height: 1;
+ font-size: 14px;
+}
+
+.contentOuterPanel {
+ background: #dddcdc;
+ margin: 0 12px 0 12px;
+ padding: 12px;
+}
+
+/** Example rules used by the template application (remove for your app) */
+h1 {
+ font-size: 2em;
+ font-family: 'UbuntuBold', Arial, Verdana, sans-serif;
+ color: #777777;
+ margin: 40px 0px 70px;
+ text-align: center;
+}
+
+table {
+ border-collapse: separate;
+}
+
+.LogoAndTitlePanel {
+ height: 68px;
+ font-family: Arial, Verdana, sans-serif;
+ position: fixed;
+ width: 100%;
+ top: 0;
+ background-image: url(images/white_gradient_header.png), url(images/header_bg_modern.png);
+ background-position: center top, 0 0;
+ background-repeat: no-repeat, repeat-x;
+ box-shadow: 0 0 20px #858585;
+ -moz-box-shadow: 0 0 20px #858585;
+ -webkit-box-shadow: 0 0 20px #858585;
+}
+
+.LogoAndTitlePanel:after {
+ content: " ";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.RaceBoardHeaderPanel {
+ margin: 0 12px 14px 12px;
+}
+
+.sapLogo {
+ float: left;
+ margin: 13px 0 0 12px;
+}
+
+.sailingAnalyticsLabelPanel {
+ margin: 10px 0 0 0;
+}
+
+.sailingAnalyticsLabel {
+ float: left;
+ color: #fff;
+ font-size: 14px;
+ font-weight: bold;
+ margin: 15px 0 0 0;
+}
+
+.leaderboardLabel {
+ border-bottom: 2px solid #007dc0;
+ padding: 0 0 6px 0;
+ font-family: 'UbuntuBold', Arial, Verdana, sans-serif;
+}
+
+.refreshAndSettings {
+ background: #f2f2f2;
+ border-bottom: 2px solid #fff;
+ border-top: 2px solid #fff;
+ height: 30px;
+}
+
+.refreshAndSettings table td {
+ padding: 0 10px 0 0;
+}
+
+.refreshAndSettings table table td {
+ padding: 0 0 0 0;
+}
+
+.race-name {
+ line-height: 1.0;
+}
+
+input.magnifier {
+ display: block;
+ margin: 3px auto 0 auto !important;
+}
+
+.timeLinePanel {
+ width: 100%;
+ position: fixed;
+ bottom: 0;
+ height: 140px;
+ z-index: 9;
+ background: #DDDCDC;
+ box-shadow: 0 0 20px #858585;
+ -webkit-box-shadow: 0 0 20px #858585;
+ -moz-box-shadow: 0 0 20px #858585;
+}
+
+.timeLineInnerPanel {
+ /*height: 100%;*/
+ margin: 0 12px;
+ margin-top: 20px;
+ background: #dddcdc;
+ /*padding: 38px 24px 0 24px;*/
+}
+
+.timeLineInnerBgPanel {
+ background: url(images/timeslider-bg.png) 0 0 repeat-x #f6f6f6;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ padding: 6px 10px 0;
+ border: 1px solid #a6a6a6;
+}
+
+.footerShadowPanel {
+ position: fixed;
+ height: 15px;
+ bottom: 0;
+ background: url(images/footer_shadow.png) left bottom repeat-x;
+ width: 100%;
+ z-index: 10;
+}
+
+.breadcrumbPanel {
+ height: 30px;
+ margin: 0 12px 13px 12px;
+}
+
+.mainPanel {
+ width: 100%;
+}
+
+.raceBoardNavigation {
+ float: right;
+ margin: 26px 0 0 0;
+ font-family: 'UbuntuLight', Arial, Verdana, sans-serif;
+}
+
+.raceBoardNavigation-navigationitem {
+ color: #dddcdc;
+ text-transform: uppercase;
+ font-weight: 500;
+ margin: 0 12px 0 0;
+ padding: 0 0 5px 0;
+}
+
+.raceBoardNavigation-navigationitem:hover {
+ border-bottom: 4px solid #f0ab00;
+ color: #dddcdc;
+ text-decoration: none;
+}
+
+.raceBoardNavigation-navigationitem:active {
+ border-bottom: 4px solid #f0ab00;
+ color: #dddcdc;
+ text-decoration: none;
+}
+
+.timePanel-controls {
+ margin: 9px 0 0 0;
+}
+
+.timePanel-controls-play {
+}
+
+.timePanel-controls-playSpeed {
+ vertical-align: middle;
+ padding: 5px;
+ line-height: 25px;
+}
+
+.timePanel-label {
+}
+
+.timePanel-controls-time {
+}
+
+.timePanel-controls-timeDelay {
+}
+
+.gwt-DialogBox {
+ z-index: 20;
+}
+
+
+.abstractChartPanel-importantMessageOfChart {
+ font-family: 'UbuntuBold',Arial,Verdana,sans-serif;
+ font-size: 20px;
+ height: 70px;
+ margin: 0 auto;
+ padding: 49px 0 0 80px;
+ width: 300px;
+ color: #7c7c7c;
+ background: url(images/important-message.png) left center no-repeat;
+}
+
+.breadcrumbPanel-NextArrow {
+ display: none;
+}
\ No newline at end of file
diff --git a/java/com.sap.sailing.gwt.ui/Simulator.html b/java/com.sap.sailing.gwt.ui/Simulator.html
new file mode 100644
index 00000000000..ffe9af8203f
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/Simulator.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+ SAP Sailing Analytics Race Simulator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml b/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml
index 674f9ceb1da..1c3d3cde1bd 100755
--- a/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml
+++ b/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml
@@ -14,6 +14,16 @@
/sailing
+
+ Simulator Service
+ SimulatorService
+ com.sap.sailing.gwt.ui.server.SimulatorServiceImpl
+
+
+ SimulatorService
+ com.sap.sailing.gwt.ui.Simulator/simulator
+
+
User Management Service
UserManagementService
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorService.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorService.java
new file mode 100644
index 00000000000..7314b41746d
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorService.java
@@ -0,0 +1,15 @@
+package com.sap.sailing.gwt.ui.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeGenParamsDTO;
+
+@RemoteServiceRelativePath("simulator")
+public interface SimulatorService extends RemoteService {
+
+ public PositionDTO[] getRaceLocations();
+
+ public WindLatticeDTO getWindLatice(WindLatticeGenParamsDTO params);
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorServiceAsync.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorServiceAsync.java
new file mode 100644
index 00000000000..46277d2d096
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SimulatorServiceAsync.java
@@ -0,0 +1,15 @@
+package com.sap.sailing.gwt.ui.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeGenParamsDTO;
+
+public interface SimulatorServiceAsync {
+
+ void getRaceLocations(AsyncCallback callback);
+
+ void getWindLatice(WindLatticeGenParamsDTO params,
+ AsyncCallback callback);
+
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SimulatorServiceImpl.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SimulatorServiceImpl.java
new file mode 100644
index 00000000000..9f89979f4d6
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SimulatorServiceImpl.java
@@ -0,0 +1,89 @@
+package com.sap.sailing.gwt.ui.server;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import com.sap.sailing.domain.common.Bearing;
+import com.sap.sailing.domain.common.Distance;
+import com.sap.sailing.domain.common.Position;
+import com.sap.sailing.domain.common.impl.DegreeBearingImpl;
+import com.sap.sailing.domain.common.impl.DegreePosition;
+import com.sap.sailing.domain.common.impl.NauticalMileDistance;
+import com.sap.sailing.gwt.ui.client.SimulatorService;
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeDTO;
+import com.sap.sailing.gwt.ui.simulator.WindLatticeGenParamsDTO;
+
+public class SimulatorServiceImpl extends RemoteServiceServlet implements SimulatorService {
+
+ /**
+ * Generated uid serial version
+ */
+ private static final long serialVersionUID = 4445427185387524086L;
+
+ @Override
+ public PositionDTO [] getRaceLocations() {
+ PositionDTO lakeGarda = new PositionDTO();
+ lakeGarda.latDeg = 45.57055337226086;
+ lakeGarda.lngDeg = 10.693345069885254;
+
+ PositionDTO lakeGeneva = new PositionDTO();
+ lakeGeneva.latDeg = 46.23376539670794;
+ lakeGeneva.lngDeg = 6.168651580810547;
+
+ return new PositionDTO[]{lakeGeneva, lakeGarda};
+ }
+
+ public WindLatticeDTO getWindLatice(WindLatticeGenParamsDTO params) {
+ final Bearing north = new DegreeBearingImpl(0);
+ final Bearing east = new DegreeBearingImpl(90);
+ final Bearing south = new DegreeBearingImpl(180);
+ final Bearing west = new DegreeBearingImpl(270);
+
+ final double xSize = params.getxSize();
+ final double ySize = params.getySize();
+ final int gridsizeX = params.getGridsizeX();
+ final int gridsizeY = params.getGridsizeY();
+
+ Position center = new DegreePosition(params.getCenter().latDeg, params.getCenter().lngDeg);
+
+ WindLatticeDTO wl = new WindLatticeDTO();
+ PositionDTO [][] matrix = new PositionDTO[gridsizeX][gridsizeY];
+
+ Distance deastwest = new NauticalMileDistance((gridsizeX-1.) / (2*gridsizeX) * xSize);
+ Distance dnorthsouth = new NauticalMileDistance((gridsizeY-1.) / (2*gridsizeY) * ySize);
+ Position start = center.translateGreatCircle(south, dnorthsouth).translateGreatCircle(west, deastwest);
+
+ deastwest = new NauticalMileDistance(xSize / gridsizeX);
+ dnorthsouth = new NauticalMileDistance(ySize / gridsizeY);
+
+ Position rowStart = null, crt = null;
+ for( int i = 0; i < gridsizeY; i++ ) {
+ if( i == 0 ) {
+ rowStart = start;
+ } else {
+ rowStart = rowStart.translateGreatCircle(north, dnorthsouth);
+ }
+
+ for( int j = 0; j < gridsizeX; j++) {
+ if( j == 0 ) {
+ crt = rowStart;
+ } else {
+ crt = crt.translateGreatCircle(east, deastwest);
+ if( (i == 3) && (j == 5) ) {
+ crt = crt.translateGreatCircle(north, new NauticalMileDistance(ySize / gridsizeY * Math.random()));
+ crt = crt.translateGreatCircle(east, new NauticalMileDistance(xSize / gridsizeX * Math.random()));
+ crt = crt.translateGreatCircle(south, new NauticalMileDistance(ySize / gridsizeY * Math.random()));
+ crt = crt.translateGreatCircle(west, new NauticalMileDistance(xSize / gridsizeX * Math.random()));
+ }
+ }
+
+ PositionDTO pdto = new PositionDTO(crt.getLatDeg(), crt.getLngDeg());
+ matrix[i][j] = pdto;
+ }
+
+ }
+
+ wl.setMatrix(matrix);
+
+ return wl;
+ }
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/.gitignore b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/.gitignore
new file mode 100644
index 00000000000..cd21cf5041d
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/.gitignore
@@ -0,0 +1,2 @@
+/WindLatticeDTO.java
+/WindLatticeGenParamsDTO.java
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorEntryPoint.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorEntryPoint.java
new file mode 100644
index 00000000000..5fadbf83b0a
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorEntryPoint.java
@@ -0,0 +1,173 @@
+package com.sap.sailing.gwt.ui.simulator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.maps.client.MapWidget;
+import com.google.gwt.maps.client.Maps;
+import com.google.gwt.maps.client.event.MapClickHandler;
+import com.google.gwt.maps.client.geom.LatLng;
+import com.google.gwt.maps.client.overlay.Polyline;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.RootLayoutPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.sap.sailing.gwt.ui.client.SimulatorService;
+import com.sap.sailing.gwt.ui.client.SimulatorServiceAsync;
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+
+public class SimulatorEntryPoint implements EntryPoint {
+ private final SimulatorServiceAsync simulatorSvc = GWT.create(SimulatorService.class);
+
+ private final VerticalPanel panel = new VerticalPanel();
+ private final ListBox raceSelector = new ListBox();
+
+ private MapWidget mapw;
+ private Polyline [] windlattice = new Polyline[0];
+ private List locations = new ArrayList();
+
+ @Override
+ public void onModuleLoad() {
+ /*
+ * Asynchronously loads the Maps API.
+ *
+ * The first parameter should be a valid Maps API Key to deploy this
+ * application on a public server, but a blank key will work for an
+ * application served from localhost.
+ */
+ Maps.loadMapsApi("", "2", false, new Runnable() {
+ public void run() {
+ buildUi();
+ }
+ });
+ }
+
+ private void buildUi() {
+ loadRaceLocations();
+
+ initMap();
+ initRaceSelector();
+ initPanel();
+
+ // Add the map to the HTML host page
+ RootLayoutPanel.get().add(panel);
+ }
+
+ private void initMap() {
+ mapw = new MapWidget();
+ mapw.setUI(SimulatorMapOptions.newInstance());
+ mapw.setZoomLevel(7);
+ mapw.setSize("100%", "650px");
+
+ mapw.addMapClickHandler(new MapClickHandler() {
+ @Override
+ public void onClick(MapClickEvent event) {
+ generateWindLattice(event.getLatLng());
+ }
+ });
+ }
+
+ private void loadRaceLocations() {
+ simulatorSvc.getRaceLocations(new AsyncCallback() {
+ @Override
+ public void onFailure(Throwable caught) {
+ String message = caught.getMessage();
+ for( StackTraceElement ste : caught.getStackTrace() ) {
+ message += ste.toString() + "\n\t";
+ }
+ Window.alert("Failed servlet call to SimulatorService\n" + message);
+ }
+
+ @Override
+ public void onSuccess(PositionDTO[] result) {
+ locations.clear();
+ int i = 0;
+ for( PositionDTO rl : result ) {
+ locations.add(rl);
+ raceSelector.addItem(Integer.toString(++i));
+ }
+ }
+ });
+ }
+
+ private void initRaceSelector() {
+ raceSelector.setVisibleItemCount(1);
+ raceSelector.setTitle("Race Location Selection");
+ raceSelector.setSize("100%", "20px");
+
+ raceSelector.addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ PositionDTO rl = locations.get(raceSelector.getSelectedIndex());
+ selectRaceLocation(rl);
+ }
+ });
+ }
+
+ private void initPanel() {
+ panel.add(raceSelector);
+ panel.add(mapw);
+ panel.setSize("100%", "100%");
+ }
+
+ private void selectRaceLocation(PositionDTO rl) {
+ mapw.clearOverlays();
+ LatLng position = LatLng.newInstance(rl.latDeg, rl.lngDeg);
+ mapw.panTo(position);
+ }
+
+ private void generateWindLattice(LatLng center) {
+ WindLatticeGenParamsDTO params = new WindLatticeGenParamsDTO();
+ params.setCenter(new PositionDTO(center.getLatitude(), center.getLongitude()));
+ params.setGridsizeX(25);
+ params.setGridsizeY(25);
+ params.setxSize(1);
+ params.setySize(1);
+
+ simulatorSvc.getWindLatice(params, new AsyncCallback(){
+ @Override
+ public void onFailure(Throwable message) {
+ Window.alert("Failed servlet call to SimulatorService\n" + message);
+ }
+ @Override
+ public void onSuccess(WindLatticeDTO wl) {
+ refreshWindLattice(wl);
+ }
+ });
+ }
+
+ private void refreshWindLattice(WindLatticeDTO wl) {
+ PositionDTO [][] matrix = wl.getMatrix();
+ int numRows = matrix.length;
+ int numCols = matrix[0].length;
+ int line = 0;
+
+ Polyline [] newWindLattice = new Polyline[numRows + numCols];
+
+ for( int i = 0; i < numRows; i++ ) {
+ LatLng [] points = new LatLng[numCols];
+ for( int j = 0; j < numCols; j++ ) {
+ points[j] = LatLng.newInstance(matrix[i][j].latDeg, matrix[i][j].lngDeg);
+ }
+ newWindLattice[line++] = new Polyline(points, "#000000", 1);
+ }
+
+ for( int i = 0; i < numCols; i++ ) {
+ LatLng [] points = new LatLng[numRows];
+ for( int j = 0; j < numRows; j++ ) {
+ points[j] = LatLng.newInstance(matrix[j][i].latDeg, matrix[j][i].lngDeg);
+ }
+ newWindLattice[line++] = new Polyline(points, "#000000", 1);
+ }
+
+ mapw.clearOverlays();
+ for( Polyline pl : newWindLattice ) {
+ this.mapw.addOverlay(pl);
+ }
+ }
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorMapOptions.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorMapOptions.java
new file mode 100644
index 00000000000..70f6c02645f
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorMapOptions.java
@@ -0,0 +1,39 @@
+package com.sap.sailing.gwt.ui.simulator;
+
+import com.google.gwt.maps.client.MapUIOptions;
+import com.google.gwt.maps.client.geom.Size;
+
+public class SimulatorMapOptions {
+ private final static int width = 500;
+ private final static int height = 300;
+ private final static boolean doubleClick = true;
+ private final static boolean hybridMapType = false;
+ private final static boolean keyboard = false;
+ private final static boolean largeMapControl3d = false;
+ private final static boolean mapTypeControl = false;
+ private final static boolean menuMapTypeControl = false;
+ private final static boolean normalMapType = true;
+ private final static boolean physicalMapType = false;
+ private final static boolean satelliteMapType = false;
+ private final static boolean scaleControl = true;
+ private final static boolean scrollwheel = true;
+ private final static boolean smallZoomControl3d = true;
+
+ public static MapUIOptions newInstance() {
+ MapUIOptions mapOptions = MapUIOptions.newInstance(Size.newInstance(width, height));
+ mapOptions.setDoubleClick(doubleClick);
+ mapOptions.setHybridMapType(hybridMapType);
+ mapOptions.setKeyboard(keyboard);
+ mapOptions.setLargeMapControl3d(largeMapControl3d);
+ mapOptions.setMapTypeControl(mapTypeControl);
+ mapOptions.setMenuMapTypeControl(menuMapTypeControl);
+ mapOptions.setNormalMapType(normalMapType);
+ mapOptions.setPhysicalMapType(physicalMapType);
+ mapOptions.setSatelliteMapType(satelliteMapType);
+ mapOptions.setScaleControl(scaleControl);
+ mapOptions.setScrollwheel(scrollwheel);
+ mapOptions.setSmallZoomControl3d(smallZoomControl3d);
+
+ return mapOptions;
+ }
+}
\ No newline at end of file
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeDTO.java
new file mode 100644
index 00000000000..7f67edc2f70
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeDTO.java
@@ -0,0 +1,25 @@
+package com.sap.sailing.gwt.ui.simulator;
+
+import java.io.Serializable;
+
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+
+public class WindLatticeDTO implements Serializable {
+
+ /**
+ * Generated uid for serialisation
+ */
+ private static final long serialVersionUID = -2110785502151983845L;
+ private PositionDTO [][] matrix;
+
+ public WindLatticeDTO() {
+ }
+
+ public void setMatrix( PositionDTO [][] matrix ) {
+ this.matrix = matrix;
+ }
+
+ public PositionDTO[][] getMatrix() {
+ return matrix;
+ }
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeGenParamsDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeGenParamsDTO.java
new file mode 100644
index 00000000000..ae1c69a1dc0
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/WindLatticeGenParamsDTO.java
@@ -0,0 +1,63 @@
+package com.sap.sailing.gwt.ui.simulator;
+
+import java.io.Serializable;
+
+import com.sap.sailing.gwt.ui.shared.PositionDTO;
+
+public class WindLatticeGenParamsDTO implements Serializable {
+
+ /**
+ * Generated uid for serialisation
+ */
+ private static final long serialVersionUID = 6074038176026601942L;
+
+ private PositionDTO center;
+ private double xSize = 1;
+ private double ySize = 1;
+ private int gridsizeX = 20;
+ private int gridsizeY = 20;
+
+ public WindLatticeGenParamsDTO() {
+ }
+
+ public void setCenter(PositionDTO center) {
+ this.center = center;
+ }
+
+ public PositionDTO getCenter() {
+ return center;
+ }
+
+ public double getxSize() {
+ return xSize;
+ }
+
+ public void setxSize(double xSize) {
+ this.xSize = xSize;
+ }
+
+ public double getySize() {
+ return ySize;
+ }
+
+ public void setySize(double ySize) {
+ this.ySize = ySize;
+ }
+
+ public int getGridsizeX() {
+ return gridsizeX;
+ }
+
+ public void setGridsizeX(int gridsizeX) {
+ this.gridsizeX = gridsizeX;
+ }
+
+ public int getGridsizeY() {
+ return gridsizeY;
+ }
+
+ public void setGridsizeY(int gridsizeY) {
+ this.gridsizeY = gridsizeY;
+ }
+
+}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/Simulator.gwt.xml b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/Simulator.gwt.xml
new file mode 100644
index 00000000000..2be3b4c5edd
--- /dev/null
+++ b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/Simulator.gwt.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file