예제 #1
0
        public static void SetDistanceAndAngleGeocacheFromLocation(GAPPSF.Core.Data.Geocache gc, GAPPSF.Core.Data.Location loc)
        {
            GeodeticMeasurement gm = CalculateDistance(loc.Lat, loc.Lon, gc.Lat, gc.Lon);

            gc.DistanceToCenter = (long)gm.EllipsoidalDistance;
            gc.AngleToCenter    = (int)gm.Azimuth.Degrees;
        }
예제 #2
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     GAPPSF.Core.Data.Geocache gc = value as GAPPSF.Core.Data.Geocache;
     if (gc != null)
     {
         if (gc.ContainsCustomLatLon)
         {
             return(Utils.Conversion.GetCoordinatesPresentation((double)gc.CustomLat, (double)gc.CustomLon));
         }
         else
         {
             return(Utils.Conversion.GetCoordinatesPresentation(gc.Lat, gc.Lon));
         }
     }
     return(null);
 }
예제 #3
0
 public static GeodeticMeasurement CalculateDistance(GAPPSF.Core.Data.Geocache gc, GAPPSF.Core.Data.Location loc)
 {
     return(CalculateDistance(gc.Lat, gc.Lon, loc.Lat, loc.Lon));
 }