Revert "App: Rerouting"
This commit is contained in:
parent
1a0b38d375
commit
b9b629185a
4 changed files with 3 additions and 76 deletions
|
|
@ -77,21 +77,4 @@ public final class CheapRuler {
|
|||
double dlat = (ilat1 - ilat2) * kxky[1];
|
||||
return Math.sqrt(dlat * dlat + dlon * dlon); // in m
|
||||
}
|
||||
|
||||
public static int[] destination(int lon1, int lat1, double distance, double angle) {
|
||||
|
||||
double[] lonlat2m = CheapRuler.getLonLatToMeterScales(lat1);
|
||||
double lon2m = lonlat2m[0];
|
||||
double lat2m = lonlat2m[1];
|
||||
angle = 90. - angle;
|
||||
double st = Math.sin(angle * Math.PI / 180.);
|
||||
double ct = Math.cos(angle * Math.PI / 180.);
|
||||
|
||||
int lon2 = (int) (0.5 + lon1 + ct * distance / lon2m);
|
||||
int lat2 = (int) (0.5 + lat1 + st * distance / lat2m);
|
||||
int[] ret = new int[2];
|
||||
ret[0] = lon2;
|
||||
ret[1] = lat2;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue