/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/GeoPoint.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/GeoPoint.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2577 by torben, Thu Jun 11 20:10:23 2015 UTC revision 2578 by torben, Thu Jun 11 20:39:28 2015 UTC
# Line 12  public class GeoPoint { Line 12  public class GeoPoint {
12                  latitude=lat;                  latitude=lat;
13                  longitude=lng;                  longitude=lng;
14          }          }
15            
16          public static double beregnAfstand(GeoPoint point1, GeoPoint point2) {                    //Denne er alt for upræcis
17            @Deprecated    
18            public static double beregnAfstand_old(GeoPoint point1, GeoPoint point2) {              
19                  //(62.8*sqrt(3.1*(Power(a.Latitude-x.Latitude,2)+Power(a.Longitude-x.Longitude,2)))) as Afstand,                  //(62.8*sqrt(3.1*(Power(a.Latitude-x.Latitude,2)+Power(a.Longitude-x.Longitude,2)))) as Afstand,
20                                    
21                                    
# Line 23  public class GeoPoint { Line 25  public class GeoPoint {
25                  return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) );                              return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) );            
26          }                }      
27    
28          public static float beregnAfstand2(GeoPoint p1, GeoPoint p2) {          public static float beregnAfstand(GeoPoint p1, GeoPoint p2) {
29                  float[] result = new float[1];                  float[] result = new float[1];
   
30                                    
31          computeDistanceAndBearing(p1.latitude, p1.longitude, p2.latitude, p2.longitude, result);                  computeDistanceAndBearing(p1.latitude, p1.longitude, p2.latitude, p2.longitude, result);
32    
33                  return result[0];                  return (result[0] / 1000.0f);
34          }          }
35                    
36                    

Legend:
Removed from v.2577  
changed lines
  Added in v.2578

  ViewVC Help
Powered by ViewVC 1.1.20