mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-05 11:53:53 +00:00
Merge branch 'origin/simulator_maps_v3'
This commit is contained in:
commit
af10cb1155
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -26,7 +26,7 @@ public class PathCandidate implements Comparable<PathCandidate> {
|
||||
@Override
|
||||
// sort descending by time, -#turns, width
|
||||
public int compareTo(PathCandidate other) {
|
||||
if (this.pos.getTimePoint().asMillis() == other.pos.getTimePoint().asMillis()) {
|
||||
if (Math.abs(this.pos.getTimePoint().asMillis() - other.pos.getTimePoint().asMillis()) <= 1000) {
|
||||
if (this.trn == other.trn) {
|
||||
if (Math.abs(this.hrz) == Math.abs(other.hrz)) {
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ public class PathGeneratorTreeGrowWind extends PathGeneratorBase {
|
||||
TimePoint prevTime = path.pos.getTimePoint();
|
||||
double heightFrac = path.vrt / (path.vrt - vrtDist);
|
||||
Position newPos = prevPos.translateGreatCircle(prevPos.getBearingGreatCircle(pathPos.getPosition()), prevPos.getDistance(pathPos.getPosition()).scale(heightFrac));
|
||||
long newTimeMillis = Math.round((prevTime.asMillis() + (pathPos.getTimePoint().asMillis() - prevTime.asMillis()) * heightFrac)/2000.0)*2000;
|
||||
long newTimeMillis = Math.round((prevTime.asMillis() + (pathPos.getTimePoint().asMillis() - prevTime.asMillis()) * heightFrac)/1000.0)*1000;
|
||||
TimePoint newTime = new MillisecondsTimePoint(newTimeMillis);
|
||||
pathPos = new TimedPositionImpl(newTime, newPos);
|
||||
reachedEnd = true;
|
||||
|
||||
Reference in new issue
Block a user