From 96bcfdba62680d181ce552fcc59746afe6d99345 Mon Sep 17 00:00:00 2001 From: Daniel Lisunkin Date: Thu, 6 Jun 2019 17:54:38 +0200 Subject: [PATCH] Fixed a smaller issue inside the lagrange interpolation. Differences in higher corner cases remain. --- .../sap/sailing/domain/orc/impl/ORCPerformanceCurveImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/orc/impl/ORCPerformanceCurveImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/orc/impl/ORCPerformanceCurveImpl.java index 6a7715ba14f..06e27aff1aa 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/orc/impl/ORCPerformanceCurveImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/orc/impl/ORCPerformanceCurveImpl.java @@ -231,7 +231,7 @@ public class ORCPerformanceCurveImpl implements Serializable, ORCPerformanceCurv // Controlling whether the gybe angle is greater then the other polars and eliminating those from the array int frontcutpoint = Arrays.binarySearch(allowancesTrueWindAnglesWithBeatRun, beatAngles.get(trueWindSpeed)); - int backcutpoint = Arrays.binarySearch(allowancesTrueWindAnglesWithBeatRun, gybeAngles.get(trueWindSpeed)); + int backcutpoint = Arrays.binarySearch(allowancesTrueWindAnglesWithBeatRun, gybeAngles.get(trueWindSpeed)) + 1; allowancesTrueWindAnglesWithBeatRun = Arrays.copyOfRange(allowancesTrueWindAnglesWithBeatRun, frontcutpoint, backcutpoint); int i = -1; // after the loop, i equals the next higher available polar data for the given TWA