bug5207: compilable version with average leg wind cache moved to right place

This commit is contained in:
Axel Uhl
2020-03-30 18:52:55 +02:00
parent d27827b5f1
commit b7b790e4c8
16 changed files with 102 additions and 103 deletions
@@ -15,6 +15,12 @@ public interface ORCPerformanceCurveLeg extends Serializable {
*/
Bearing getTwa();
/**
* Same as {@link #getTwa()}, but with the possibility to pass a cache that can remember the results
* of computing the wind for a specific leg across a certain computing scope.
*/
Bearing getTwa(AverageWindOnLegCache cache);
String toString();
ORCPerformanceCurveLegTypes getType();
@@ -1,5 +1,6 @@
package com.sap.sailing.domain.common.orc.impl;
import com.sap.sailing.domain.common.orc.AverageWindOnLegCache;
import com.sap.sailing.domain.common.orc.ORCPerformanceCurveLeg;
import com.sap.sailing.domain.common.orc.ORCPerformanceCurveLegTypes;
import com.sap.sse.common.Bearing;
@@ -33,6 +34,11 @@ public class ORCPerformanceCurveLegImpl implements ORCPerformanceCurveLeg {
return twa;
}
@Override
public Bearing getTwa(AverageWindOnLegCache cache) {
return twa;
}
@Override
public ORCPerformanceCurveLeg scale(double share) {
final Distance scaledLength = getLength().scale(share);