mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 02:52:22 +00:00
Corrected minDiff calculation between best maneuver angle candidates
This commit is contained in:
1 parent
01fe50ff04
commit
b51671237f
1 file changed
+1
-1
+1
-1
@@ -191,7 +191,7 @@ public class PolarDataServiceImpl implements ReplicablePolarService, ClearStateT
|
||||
: courseChangeDeg >= 0 ? Tack.STARBOARD : Tack.PORT)) {
|
||||
double targetManeuverAngle = getManeuverAngleInDegreesFromTwa(
|
||||
trueWindSpeedAndAngle.getObject().getBearing().getDegrees(), type);
|
||||
double diff = Math.abs(targetManeuverAngle) - Math.abs(courseChangeDeg);
|
||||
double diff = Math.abs(Math.abs(targetManeuverAngle) - Math.abs(courseChangeDeg));
|
||||
if (diff < minDiff) {
|
||||
minDiff = diff;
|
||||
closestTwsTwa = trueWindSpeedAndAngle;
|
||||
|
||||
Reference in new issue
Block a user