mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-14 06:18:12 +00:00
bug4134_2: wind speed spread in Swarm.java is now a constant. Removed unneccessary check in Swarm.java
This commit is contained in:
1 parent
0f11d38cad
commit
a53cf593ed
1 file changed
+8
-5
+8
-5
@@ -72,6 +72,12 @@ public class Swarm implements TimeListener {
|
||||
private final ColorMapper colorMapper;
|
||||
|
||||
private boolean clearNextFrame = false;
|
||||
|
||||
/**
|
||||
* For a windfield that has no wind speed spread, e.g. only one wind speed source, this value will be used to define
|
||||
* a {@link ValueRangeFlexibleBoundaries} for this swarm.
|
||||
*/
|
||||
private static double WINDSPEED_DEFAULT_SPREAD_IN_KNOTS = 0.1;
|
||||
|
||||
public Swarm(FullCanvasOverlay fullcanvas, MapWidget map, com.sap.sse.gwt.client.player.Timer timer,
|
||||
VectorField vectorField, StreamletParameters streamletPars) {
|
||||
@@ -346,11 +352,8 @@ public class Swarm implements TimeListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (maxSpeedInKnots == minSpeedInKnots) {
|
||||
valueRange.setMinMax(minSpeedInKnots - 0.1, maxSpeedInKnots + 0.1);
|
||||
}
|
||||
else if (Math.abs(maxSpeedInKnots - minSpeedInKnots) <= 0.1 && minSpeedInKnots < maxSpeedInKnots) {
|
||||
valueRange.setMinMax(minSpeedInKnots - 0.1, maxSpeedInKnots + 0.1);
|
||||
if (Math.abs(maxSpeedInKnots - minSpeedInKnots) <= WINDSPEED_DEFAULT_SPREAD_IN_KNOTS && minSpeedInKnots <= maxSpeedInKnots) {
|
||||
valueRange.setMinMax(minSpeedInKnots - WINDSPEED_DEFAULT_SPREAD_IN_KNOTS, maxSpeedInKnots + WINDSPEED_DEFAULT_SPREAD_IN_KNOTS);
|
||||
} else if (minSpeedInKnots <= maxSpeedInKnots) {
|
||||
valueRange.setMinMax(minSpeedInKnots, maxSpeedInKnots);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user