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)); }
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); } }
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); }
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); }
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; }
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); } }
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); } }
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; }
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); }
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); }
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); }
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; }
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" }); }
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 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; }
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); }
public static double AngleFromCellTilt(this IOutdoorCell c, IGeoPoint <double> p) { return(Math.Abs(c.MTilt + c.ETilt - c.TiltFromCell(p))); }
public ComparableCell(IGeoPoint<double> point, IOutdoorCell cell, byte pciModx = 0) { SetupComparableCell(point, cell); Budget = new LinkBudget(cell); PciModx = pciModx; }
public static double AngleFromCellAzimuth(this IOutdoorCell c, IGeoPoint <double> p) { double pa = p.PositionAzimuth(c); return(GeoMath.AllAngleBetweenAzimuths(pa, c.Azimuth)); }
public void SetupComparableCell(IGeoPoint<double> point, IOutdoorCell cell) { Cell = cell; Distance = point.SimpleDistance(cell); AzimuthAngle = cell.AngleFromCellAzimuth(point); }
public void SetupComparableCell(IGeoPoint <double> point, IOutdoorCell cell) { Cell = cell; Distance = point.SimpleDistance(cell); AzimuthAngle = cell.AngleFromCellAzimuth(point); }
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); }
public LinkBudget(IOutdoorCell cell, UrbanType utype = UrbanType.Large) : this(new BroadcastModel(cell.Frequency, utype), cell.RsPower, cell.AntennaGain) { }
public static string Info(this IOutdoorCell outdoorCell) { return("小区名称:" + outdoorCell.CellName + ";频点:" + outdoorCell.Frequency + ";<br/>站高:" + outdoorCell.Height + ";方位角:" + outdoorCell.Azimuth + ";<br/>机械下倾:" + outdoorCell.MTilt + ";电子下倾:" + outdoorCell.ETilt); }
public ComparableCell(IGeoPoint <double> point, IOutdoorCell cell, byte pciModx = 0) { SetupComparableCell(point, cell); Budget = new LinkBudget(cell); PciModx = pciModx; }
public abstract IOutdoorCell QueryCell(IOutdoorCell cell);
public MeasurableCell(IGeoPoint<double> point, IOutdoorCell cell, byte modBase = 3) : this(new ComparableCell(point, cell, (byte)(cell.Pci % modBase)), point) { }
public MeasurableCell(IGeoPoint <double> point, IOutdoorCell cell, byte modBase = 3) : this(new ComparableCell(point, cell, (byte)(cell.Pci % modBase)), point) { }