Exemplo n.º 1
0
 public override IOutdoorCell QueryCell(IOutdoorCell cell)
 {
     return(_cellList.FirstOrDefault(x => Math.Abs(x.Longtitute - cell.Longtitute) < Eps &&
                                     Math.Abs(x.Lattitute - cell.Lattitute) < Eps &&
                                     Math.Abs(x.Azimuth - cell.Azimuth) < Eps &&
                                     x.Frequency == cell.Frequency));
 }
Exemplo n.º 2
0
        public void TestQueryCell(double longtitute, double lattitute, double azimuth,
                                  int frequency, bool frequencyConsidered, bool success)
        {
            Mock <IOutdoorCell> cell = new Mock <IOutdoorCell>();

            cell.SetupGet(x => x.Longtitute).Returns(longtitute);
            cell.SetupGet(x => x.Lattitute).Returns(lattitute);
            cell.SetupGet(x => x.Azimuth).Returns(azimuth);
            cell.SetupGet(x => x.Frequency).Returns(frequency);
            if (frequencyConsidered)
            {
                service = new QueryOutdoorCellFrequencyConsidered <StubOutdoorCell>(cellList);
            }
            else
            {
                service = new QueryOutdoorCellFrequencyInconsidered <StubOutdoorCell>(cellList);
            }
            IOutdoorCell result = service.QueryCell(cell.Object);

            if (success)
            {
                Assert.IsNotNull(result);
            }
            else
            {
                Assert.IsNull(result);
            }
        }
Exemplo n.º 3
0
 private void TestInitialize(double distance)
 {
     _point2 = new StubGeoPoint(point, distance, 45);
     _ocell  = new StubOutdoorCell(_point2, 195)
     {
         Height = 40, ETilt = 4, MTilt = 1
     };
     _ccell = new ComparableCell(point, _ocell);
     _cell  = new MeasurableCell(_ccell, point, budget);
 }
Exemplo n.º 4
0
 private void TestInitialize(double distance)
 {
     point2       = new StubGeoPoint(point, distance, 45);
     ocell        = new StubOutdoorCell(point2, 225);
     ocell.Height = 40;
     ocell.ETilt  = 4;
     ocell.MTilt  = 1;
     ccell        = new ComparableCell(point, ocell);
     cell         = new MeasurableCell(ccell, point, budget);
 }
Exemplo n.º 5
0
        private static CoverageAdjustment CalculateAdjumentFromCell(this CoverageStat coveragePoint,
            IOutdoorCell cell, byte modBase = 3)
        {
            MeasurableCell mCell = new MeasurableCell(coveragePoint, cell, modBase);
            mCell.CalculateRsrp();
            CoverageAdjustment adjustment = new CoverageAdjustment
            {
                ENodebId = coveragePoint.ENodebId,
                SectorId = coveragePoint.SectorId,
                Frequency = coveragePoint.Earfcn
            };

            adjustment.SetAdjustFactor(mCell.Cell.AzimuthAngle, mCell.ReceivedRsrp - coveragePoint.Rsrp);
            return adjustment;
        }
Exemplo n.º 6
0
        public void TestQueryByName(string name, bool success)
        {
            service = new QueryOutdoorCellFrequencyConsidered <StubOutdoorCell>(cellList);
            IOutdoorCell cell = service.QueryByName(name);

            if (success)
            {
                Assert.IsNotNull(cell);
                Assert.AreEqual(cell.CellName, name);
            }
            else
            {
                Assert.IsNull(cell);
            }
        }
Exemplo n.º 7
0
        public void AddCell(EvaluationOutdoorCell cell)
        {
            IOutdoorCell existedCell = _service.QueryCell(cell);

            if (existedCell == null)
            {
                existedCell = _service.QueryCell(cell);
                CellList.Add(cell);
                if (existedCell == null)
                {
                    Region = new EvaluationRegion(CellList,
                                                  EvaluationSettings.DistanceInMeter, EvaluationSettings.DegreeSpan);
                }
                Region.InitializeParameters(CellList, EvaluationSettings.DegreeSpan);
            }
        }
Exemplo n.º 8
0
        public ComparableCell(IGeoPoint<double> point, IOutdoorCell cell, IList<ILinkBudget<double>> budgetList,
            IBroadcastModel model, byte pciModx = 0)
        {
            SetupComparableCell(point, cell);
            ILinkBudget<double> budget = budgetList.FirstOrDefault(
                x => Math.Abs(x.TransmitPower - cell.RsPower) < Eps
                && Math.Abs(x.AntennaGain - cell.AntennaGain) < Eps);
            if (budget == null)
            {
                budget = new LinkBudget(model, cell.RsPower, cell.AntennaGain);
                budgetList.Add(budget);
            }

            Budget = budget;
            PciModx = pciModx;
        }
Exemplo n.º 9
0
 public ComparableCell(IGeoPoint<double> point, IOutdoorCell cell, IList<ILinkBudget<double>> budgetList,
     byte modBase = 3)
 {
     SetupComparableCell(point, cell);
     ILinkBudget<double> budget = budgetList.FirstOrDefault(
         x => Math.Abs(x.TransmitPower - cell.RsPower) < Eps
         && Math.Abs(x.AntennaGain - cell.AntennaGain) < Eps
         && x.Model.Earfcn == cell.Frequency);
     if (budget == null)
     {
         budget = new LinkBudget(cell);
         budgetList.Add(budget);
     }
     Budget = budget;
     PciModx = (byte)(cell.Pci % modBase);
 }
Exemplo n.º 10
0
        private static CoverageAdjustment CalculateAdjumentFromCell(this CoverageStat coveragePoint,
                                                                    IOutdoorCell cell, byte modBase = 3)
        {
            MeasurableCell mCell = new MeasurableCell(coveragePoint, cell, modBase);

            mCell.CalculateRsrp();
            CoverageAdjustment adjustment = new CoverageAdjustment
            {
                ENodebId  = coveragePoint.ENodebId,
                SectorId  = coveragePoint.SectorId,
                Frequency = coveragePoint.Earfcn
            };

            adjustment.SetAdjustFactor(mCell.Cell.AzimuthAngle, mCell.ReceivedRsrp - coveragePoint.Rsrp);
            return(adjustment);
        }
Exemplo n.º 11
0
        public ComparableCell(IGeoPoint <double> point, IOutdoorCell cell, IList <ILinkBudget <double> > budgetList,
                              byte modBase = 3)
        {
            SetupComparableCell(point, cell);
            ILinkBudget <double> budget = budgetList.FirstOrDefault(
                x => Math.Abs(x.TransmitPower - cell.RsPower) < Eps &&
                Math.Abs(x.AntennaGain - cell.AntennaGain) < Eps &&
                x.Model.Earfcn == cell.Frequency);

            if (budget == null)
            {
                budget = new LinkBudget(cell);
                budgetList.Add(budget);
            }
            Budget  = budget;
            PciModx = (byte)(cell.Pci % modBase);
        }
Exemplo n.º 12
0
        public ComparableCell(IGeoPoint <double> point, IOutdoorCell cell, IList <ILinkBudget <double> > budgetList,
                              IBroadcastModel model, byte pciModx = 0)
        {
            SetupComparableCell(point, cell);
            ILinkBudget <double> budget = budgetList.FirstOrDefault(
                x => Math.Abs(x.TransmitPower - cell.RsPower) < Eps &&
                Math.Abs(x.AntennaGain - cell.AntennaGain) < Eps);

            if (budget == null)
            {
                budget = new LinkBudget(model, cell.RsPower, cell.AntennaGain);
                budgetList.Add(budget);
            }

            Budget  = budget;
            PciModx = pciModx;
        }
Exemplo n.º 13
0
        public static SectorTriangle GetSectorPoints(this IOutdoorCell outdoorCell, double radiusInMeter)
        {
            IGeoPoint <double> point1 = outdoorCell.Move(radiusInMeter, outdoorCell.Azimuth + 30);
            IGeoPoint <double> point2 = outdoorCell.Move(radiusInMeter, outdoorCell.Azimuth - 30);

            return(new SectorTriangle
            {
                X1 = outdoorCell.Longtitute + GeoMath.BaiduLongtituteOffset,
                Y1 = outdoorCell.Lattitute + GeoMath.BaiduLattituteOffset,
                X2 = point1.Longtitute + GeoMath.BaiduLongtituteOffset,
                Y2 = point1.Lattitute + GeoMath.BaiduLattituteOffset,
                X3 = point2.Longtitute + GeoMath.BaiduLongtituteOffset,
                Y3 = point2.Lattitute + GeoMath.BaiduLattituteOffset,
                Info = outdoorCell.Info(),
                CellName = outdoorCell.CellName,
                ColorString = "8C8C8C"
            });
        }
Exemplo n.º 14
0
 public void TestInitialize()
 {
     _point = new StubGeoPoint(112, 23);
     _cell = new StubOutdoorCell
     {
         RsPower = 15.2,
         AntennaGain = 17.5,
         Azimuth = 60,
         Longtitute = 112.01,
         Lattitute = 23.01,
         Height = 30,
         MTilt = 5,
         ETilt = 1,
         Pci = 22,
         Frequency = 100,
         CellName = "Cell-1"
     };
 }
 public void TestInitialize()
 {
     _point = new StubGeoPoint(112, 23);
     _cell  = new StubOutdoorCell
     {
         RsPower     = 15.2,
         AntennaGain = 17.5,
         Azimuth     = 60,
         Longtitute  = 112.01,
         Lattitute   = 23.01,
         Height      = 30,
         MTilt       = 5,
         ETilt       = 1,
         Pci         = 22,
         Frequency   = 100,
         CellName    = "Cell-1"
     };
 }
Exemplo n.º 16
0
        public static MeasurePoint GenerateMeasurePoint(IOutdoorCell[] cellList,
            byte[] pciModxList, double[] receivedRsrpList)
        {
            IList<MeasurableCell> mCellList = new List<MeasurableCell>();

            for (int i = 0; i < cellList.Length; i++)
            {
                FakeMeasurableCell mmCell = new FakeMeasurableCell()
                {
                    OutdoorCell = cellList[i],
                    PciModx = pciModxList[i],
                    ReceivedRsrp = receivedRsrpList[i]
                };
                mCellList.Add(mmCell);
            }

            FakeMeasurePoint mmPoint = new FakeMeasurePoint()
            {
                MeasurableCellList = mCellList
            };

            return mmPoint.MeasurePoint;
        }
Exemplo n.º 17
0
        public static double TiltFromCell(this IOutdoorCell c, IGeoPoint <double> p)
        {
            double d = p.SimpleDistance(c);

            return(Math.Atan2(c.Height, d * 1000) * 180 / Math.PI);
        }
Exemplo n.º 18
0
 public static double AngleFromCellTilt(this IOutdoorCell c, IGeoPoint <double> p)
 {
     return(Math.Abs(c.MTilt + c.ETilt - c.TiltFromCell(p)));
 }
Exemplo n.º 19
0
 public ComparableCell(IGeoPoint<double> point, IOutdoorCell cell, byte pciModx = 0)
 {
     SetupComparableCell(point, cell);
     Budget = new LinkBudget(cell);
     PciModx = pciModx;
 }
Exemplo n.º 20
0
        public static double AngleFromCellAzimuth(this IOutdoorCell c, IGeoPoint <double> p)
        {
            double pa = p.PositionAzimuth(c);

            return(GeoMath.AllAngleBetweenAzimuths(pa, c.Azimuth));
        }
Exemplo n.º 21
0
 public void SetupComparableCell(IGeoPoint<double> point, IOutdoorCell cell)
 {
     Cell = cell;
     Distance = point.SimpleDistance(cell);
     AzimuthAngle = cell.AngleFromCellAzimuth(point);
 }
Exemplo n.º 22
0
 public void SetupComparableCell(IGeoPoint <double> point, IOutdoorCell cell)
 {
     Cell         = cell;
     Distance     = point.SimpleDistance(cell);
     AzimuthAngle = cell.AngleFromCellAzimuth(point);
 }
Exemplo n.º 23
0
 private void TestInitialize(double distance)
 {
     _point2 = new StubGeoPoint(point, distance, 45);
     _ocell = new StubOutdoorCell(_point2, 195) {Height = 40, ETilt = 4, MTilt = 1};
     _ccell = new ComparableCell(point, _ocell);
     _cell = new MeasurableCell(_ccell, point, budget);
 }
Exemplo n.º 24
0
 public LinkBudget(IOutdoorCell cell, UrbanType utype = UrbanType.Large)
     : this(new BroadcastModel(cell.Frequency, utype), cell.RsPower, cell.AntennaGain)
 {
 }
Exemplo n.º 25
0
 private void TestInitialize(double distance)
 {
     point2 = new StubGeoPoint(point, distance, 45);
     ocell = new StubOutdoorCell(point2, 225);
     ocell.Height = 40;
     ocell.ETilt = 4;
     ocell.MTilt = 1;
     ccell = new ComparableCell(point, ocell);
     cell = new MeasurableCell(ccell, point, budget);
 }
Exemplo n.º 26
0
 public static string Info(this IOutdoorCell outdoorCell)
 {
     return("小区名称:" + outdoorCell.CellName + ";频点:" + outdoorCell.Frequency
            + ";<br/>站高:" + outdoorCell.Height + ";方位角:" + outdoorCell.Azimuth
            + ";<br/>机械下倾:" + outdoorCell.MTilt + ";电子下倾:" + outdoorCell.ETilt);
 }
Exemplo n.º 27
0
 public ComparableCell(IGeoPoint <double> point, IOutdoorCell cell, byte pciModx = 0)
 {
     SetupComparableCell(point, cell);
     Budget  = new LinkBudget(cell);
     PciModx = pciModx;
 }
Exemplo n.º 28
0
 public abstract IOutdoorCell QueryCell(IOutdoorCell cell);
Exemplo n.º 29
0
 public MeasurableCell(IGeoPoint<double> point, IOutdoorCell cell, byte modBase = 3)
     : this(new ComparableCell(point, cell, (byte)(cell.Pci % modBase)), point)
 {
 }
Exemplo n.º 30
0
 public MeasurableCell(IGeoPoint <double> point, IOutdoorCell cell, byte modBase = 3) :
     this(new ComparableCell(point, cell, (byte)(cell.Pci % modBase)), point)
 {
 }