22 |
|
|
23 |
return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) ); |
return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) ); |
24 |
} |
} |
25 |
|
|
26 |
|
|
27 |
|
//Latitude (horizonal), longitude(vertical) so |
28 |
|
// 1 degree latitude is ~ 111320 meters, since the distance between the horizonal lines is always the same |
29 |
|
// 1 degree longitude is ~111320 meters at equator but gets shorter as we get closer to the poles. |
30 |
|
// so 1 degree longitude is 64.5 km at denmarks southern point (gedser=54.55,11.95) |
31 |
|
// and is 59.4km at northern point (skagen = 57.75,10.65) |
32 |
|
|
33 |
|
public static double kmToLatitude(double km) { |
34 |
|
return km / 111.320 ; |
35 |
|
} |
36 |
|
|
37 |
|
public static double kmToLongitude( double km) {//denne er kun ca |
38 |
|
return km / 62.0; |
39 |
|
} |
40 |
} |
} |