mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 10:23:51 +00:00
All the path generators are now using the SimulatorUISelectionDTO object.
This commit is contained in:
1 parent
9a194a18b0
commit
9bc61f9835
3 files changed
+16
-36
No files matched your search
+5
-15
@@ -4,11 +4,7 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class Request1TurnerDTO implements IsSerializable {
|
||||
|
||||
public Integer selectedBoatClassIndex = 0;
|
||||
public Integer selectedRaceIndex = 0;
|
||||
public Integer selectedCompetitorIndex = 0;
|
||||
public Integer selectedLegIndex = 0;
|
||||
|
||||
public SimulatorUISelectionDTO selection = null;
|
||||
public PositionDTO oldMovedPoint = null;
|
||||
public PositionDTO newMovedPoint = null;
|
||||
public PositionDTO beforeMovedPoint = null;
|
||||
@@ -19,10 +15,7 @@ public class Request1TurnerDTO implements IsSerializable {
|
||||
public Double startToEndBearingDegrees = 0.0;
|
||||
|
||||
public Request1TurnerDTO() {
|
||||
this.selectedBoatClassIndex = 0;
|
||||
this.selectedRaceIndex = 0;
|
||||
this.selectedCompetitorIndex = 0;
|
||||
this.selectedLegIndex = 0;
|
||||
this.selection = null;
|
||||
|
||||
this.oldMovedPoint = null;
|
||||
this.newMovedPoint = null;
|
||||
@@ -35,14 +28,11 @@ public class Request1TurnerDTO implements IsSerializable {
|
||||
|
||||
}
|
||||
|
||||
public Request1TurnerDTO(Integer selectedBoatClassIndex, Integer selectedRaceIndex, Integer selectedCompetitorIndex, Integer selectedLegIndex,
|
||||
PositionDTO oldMovedPoint, PositionDTO newMovedPoint, PositionDTO beforeMovedPoint, PositionDTO edgeStart, PositionDTO edgeEnd,
|
||||
public Request1TurnerDTO(SimulatorUISelectionDTO selection, PositionDTO oldMovedPoint, PositionDTO newMovedPoint, PositionDTO beforeMovedPoint,
|
||||
PositionDTO edgeStart, PositionDTO edgeEnd,
|
||||
Long oldMovedPointTimePoint, Double startToEndBearingDegrees) {
|
||||
|
||||
this.selectedBoatClassIndex = selectedBoatClassIndex;
|
||||
this.selectedRaceIndex = selectedRaceIndex;
|
||||
this.selectedCompetitorIndex = selectedCompetitorIndex;
|
||||
this.selectedLegIndex = selectedLegIndex;
|
||||
this.selection = selection;
|
||||
|
||||
this.oldMovedPoint = oldMovedPoint;
|
||||
this.newMovedPoint = newMovedPoint;
|
||||
|
||||
+5
-14
@@ -7,18 +7,15 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class RequestTotalTimeDTO implements IsSerializable {
|
||||
|
||||
public int selectedBoatClassIndex = 0;
|
||||
public SimulatorUISelectionDTO selection = null;
|
||||
public List<SimulatorWindDTO> allPoints = null;
|
||||
public List<PositionDTO> turnPoints = null;
|
||||
public boolean useRealAverageWindSpeed = false;
|
||||
public int stepDurationMilliseconds = 0;
|
||||
public boolean debugMode = false;
|
||||
public int selectedRaceIndex;
|
||||
public int selectedCompetitorIndex;
|
||||
public int selectedLegIndex;
|
||||
|
||||
public RequestTotalTimeDTO() {
|
||||
this.selectedBoatClassIndex = 0;
|
||||
this.selection = null;
|
||||
this.allPoints = new ArrayList<SimulatorWindDTO>();
|
||||
this.turnPoints = new ArrayList<PositionDTO>();
|
||||
this.useRealAverageWindSpeed = true;
|
||||
@@ -26,19 +23,13 @@ public class RequestTotalTimeDTO implements IsSerializable {
|
||||
this.debugMode = false;
|
||||
}
|
||||
|
||||
public RequestTotalTimeDTO(int selectedBoatClassIndex, int selectedRaceIndex, int selectedCompetitorIndex, int selectedLegIndex,
|
||||
int stepDurationMilliseconds,
|
||||
List<SimulatorWindDTO> allPoints, List<PositionDTO> turnPoints, boolean useRealAverageWindSpeed, boolean debugMode) {
|
||||
this.selectedBoatClassIndex = selectedBoatClassIndex;
|
||||
public RequestTotalTimeDTO(SimulatorUISelectionDTO selection, int stepDurationMilliseconds, List<SimulatorWindDTO> allPoints, List<PositionDTO> turnPoints,
|
||||
boolean useRealAverageWindSpeed, boolean debugMode) {
|
||||
this.selection = selection;
|
||||
this.allPoints = allPoints;
|
||||
this.turnPoints = turnPoints;
|
||||
this.useRealAverageWindSpeed = useRealAverageWindSpeed;
|
||||
this.stepDurationMilliseconds = stepDurationMilliseconds;
|
||||
|
||||
this.selectedRaceIndex = selectedRaceIndex;
|
||||
this.selectedCompetitorIndex = selectedCompetitorIndex;
|
||||
this.selectedLegIndex = selectedLegIndex;
|
||||
|
||||
this.debugMode = debugMode;
|
||||
}
|
||||
}
|
||||
+6
-7
@@ -17,7 +17,7 @@ public class SimulatorWindDTO implements IsSerializable {
|
||||
this.timepoint = 0L;
|
||||
}
|
||||
|
||||
public SimulatorWindDTO(final PositionDTO position, final double windSpeedKn, final double windBearingDeg, final long timepointMsec) {
|
||||
public SimulatorWindDTO(PositionDTO position, double windSpeedKn, double windBearingDeg, long timepointMsec) {
|
||||
this.position = position;
|
||||
this.trueWindBearingDeg = windBearingDeg;
|
||||
this.trueWindSpeedInKnots = windSpeedKn;
|
||||
@@ -25,7 +25,7 @@ public class SimulatorWindDTO implements IsSerializable {
|
||||
this.isTurn = false;
|
||||
}
|
||||
|
||||
public SimulatorWindDTO(final double latDeg, final double lngDeg, final double windSpeedKn, final double windBearingDeg, final long timepointMsec) {
|
||||
public SimulatorWindDTO(double latDeg, double lngDeg, double windSpeedKn, double windBearingDeg, long timepointMsec) {
|
||||
this.position = new PositionDTO(latDeg, lngDeg);
|
||||
this.trueWindBearingDeg = windBearingDeg;
|
||||
this.trueWindSpeedInKnots = windSpeedKn;
|
||||
@@ -33,8 +33,7 @@ public class SimulatorWindDTO implements IsSerializable {
|
||||
this.isTurn = false;
|
||||
}
|
||||
|
||||
public SimulatorWindDTO(final double latDeg, final double lngDeg, final double windSpeedKn, final double windBearingDeg, final long timepointMsec,
|
||||
final boolean isTurn) {
|
||||
public SimulatorWindDTO(double latDeg, double lngDeg, double windSpeedKn, double windBearingDeg, long timepointMsec, boolean isTurn) {
|
||||
this.position = new PositionDTO(latDeg, lngDeg);
|
||||
this.trueWindBearingDeg = windBearingDeg;
|
||||
this.trueWindSpeedInKnots = windSpeedKn;
|
||||
@@ -45,7 +44,7 @@ public class SimulatorWindDTO implements IsSerializable {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
final int prime = 31;
|
||||
int prime = 31;
|
||||
int result = 1;
|
||||
|
||||
long temp = 0;
|
||||
@@ -67,12 +66,12 @@ public class SimulatorWindDTO implements IsSerializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
public boolean equals(Object o) {
|
||||
if (o == null) {
|
||||
return false;
|
||||
} else {
|
||||
if (o instanceof SimulatorWindDTO) {
|
||||
final SimulatorWindDTO other = (SimulatorWindDTO) o;
|
||||
SimulatorWindDTO other = (SimulatorWindDTO) o;
|
||||
|
||||
return this.position.equals(other.position) && (Math.abs(this.timepoint - other.timepoint) < 9999);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user