Beispiel #1
0
 private PredictionBound GetBoundOfSector(AntConfig antConfig, double siteX, double siteY, float radius)
 {
     PredictionBound bound = new PredictionBound();
     bound.Left = (siteX + antConfig.DX) - radius;
     bound.Right = (siteX + antConfig.DX) + radius;
     bound.Top = (siteY + antConfig.DY) + radius;
     bound.Bottom = (siteY + antConfig.DY) - radius;
     return bound;
 }
Beispiel #2
0
 public PredictionBound GetBoundOfPolygon(GeoPolygonRegion polygon, float resolution)
 {
     PredictionBound bound = new PredictionBound();
     bound.Left = polygon.Left;
     bound.Right = polygon.Right;
     bound.Bottom = polygon.Bottom;
     bound.Top = polygon.Top;
     this.GetBoundary(resolution, ref bound.Left, ref bound.Right, ref bound.Bottom, ref bound.Top);
     return bound;
 }
Beispiel #3
0
 public bool IsTranceiverInCalcZone(PredictionBound polygonRegionBound, Transceiver tranc)
 {
     double x = tranc.Parent.X;
     double y = tranc.Parent.Y;
     foreach (IACell cell in tranc.Cells)
     {
         float maxCalcRadius = this.GetMaxCalcRadius(cell);
         foreach (AntConfig config in tranc.AntConfiguration)
         {
             PredictionBound sectorBound = this.GetBoundOfSector(config, x, y, maxCalcRadius);
             if (this.IsSectorInCalcZone(sectorBound, polygonRegionBound))
             {
                 return true;
             }
         }
     }
     return false;
 }
Beispiel #4
0
 private bool IsSectorInCalcZone(PredictionBound sectorBound, PredictionBound polygonRegionBound)
 {
     bool flag = (((sectorBound.Left >= polygonRegionBound.Right) || (sectorBound.Right <= polygonRegionBound.Left)) || (sectorBound.Bottom >= polygonRegionBound.Top)) || (sectorBound.Top <= polygonRegionBound.Bottom);
     return !flag;
 }