1 |
package dk.daoas.fulddaekning; |
package dk.daoas.fulddaekning; |
2 |
|
|
|
import geocode.GeoPoint; |
|
3 |
|
|
|
public class GeoPointHelper { |
|
|
|
|
|
@Deprecated |
|
|
public static double beregnAfstand_old(GeoPoint point1, GeoPoint point2) { |
|
|
// (62.8*sqrt(3.1*(Power(a.Latitude-x.Latitude,2)+Power(a.Longitude-x.Longitude,2)))) |
|
|
// as Afstand, |
|
4 |
|
|
5 |
double pwrLat = Math.pow(point1.latitude - point2.latitude, 2); |
public class GeoPointHelper { |
|
double pwrLng = Math.pow(point1.longitude - point2.longitude, 2); |
|
6 |
|
|
|
return 62.8 * Math.sqrt(3.1 * (pwrLat + pwrLng)); |
|
|
} |
|
|
|
|
7 |
|
|
8 |
|
|
9 |
// Latitude (horizonal), longitude(vertical) so |
// Latitude (horizonal), longitude(vertical) so |