Merge branch 'origin/simulator_maps_v3'

This commit is contained in:
Christopher Ronnewinkel (D036654) committed 2014-07-29 19:56:10 +02:00
commit af10cb1155
2 files changed
+2 -2

No files matched your search

@@ -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;
@@ -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;