예제 #1
0
파일: SPMAdjustDT.cs 프로젝트: xiaoyj/Space
 private void OverAllBin(CWFileInformation dtFileInfo, ref int binIndex)
 {
         foreach (BinInformation binInfo in dtFileInfo.BinInfoList)
         {
             if (binInfo.IsValid)
             {
                 base.dataForResultView.Distance[binIndex] = binInfo.Distance;
                 base.dataForResultView.ActualPLArray[binIndex] = binInfo.ActualPathLoss;
                 base.dataForResultView.ModelPLArray[binIndex] = binInfo.ModelOriPathLoss;
                 base.dataForResultView.AdjustPLArray[binIndex] = binInfo.ModelAdjPathLoss;
                 base.dataForResultView.ErrorArray[binIndex] = binInfo.ModelAdjError;
                 binIndex++;
             }
         }
 }
예제 #2
0
파일: SPMAdjustDT.cs 프로젝트: xiaoyj/Space
 private void IsCalcCWFile(CWFileInformation dtFileInfo, ref int binIndex)
 {
     if (dtFileInfo.IsCalc)
     {
         this.OverAllBin(dtFileInfo, ref binIndex);
     }
 }
예제 #3
0
파일: SPMAdjustDT.cs 프로젝트: xiaoyj/Space
        private void CalculateModelPathLoss(CWFileInformation fileInfo, SpmPropagationModel spmModel)
        {
            float num = 0f;
            //直接用可能已经过滤处理得到的BinInfoList,不用原始的CellBinInfoDic
            //foreach (KeyValuePair<string, IList<BinInformation>> pair in fileInfo.CellBinInfoDic)
            //{
            //  foreach (BinInformation information in  pair.Value)
                foreach (BinInformation binInfo in fileInfo.BinInfoList)
                {
                    if (binInfo.IsValid)
                    {
                        GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint);
                        short[] altitudes = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Height);
                        short[] buildHeights = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Building);
                        short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter);
                        float num2 = 0f;
                        if ((base.repeatTimes == 1) && (this.m_ClutterLossMethod != null))
                        {
                            num2 = this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, spmModel, fileInfo.CellInfo.Resolution);
                        }
                        float num3 = (this.m_EffTxHeightMethod == null) ? fileInfo.CellInfo.TxHeight : this.m_EffTxHeightMethod.CalcPointEffTxHt(this.m_SectionPathLossCalcParam, altitudes);
                        float num4 = (float) Math.Log10((double) num3);
                        float num5 = (this.m_DiffractionLossCalculator == null) ? 0f : this.m_DiffractionLossCalculator.GetPTPDiffractionLoss(altitudes, binInfo.Distance, buildHeights, clutters);

                        if (!(this.m_DataForAdjust.m_propModel.PropModelName == "ITUR-LTE230" || this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata"))
                        {

                            num = (((((spmModel.K1 + (spmModel.K2 * binInfo.LogDistance)) + (spmModel.K3 * num4)) + (spmModel.K4 * num5)) + ((spmModel.K5 * binInfo.LogDistance) * num4)) + (spmModel.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (spmModel.K7 * num2);

                        }
                        else if (this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata")
                        {

                            float temp = spmModel.K1-base.modelBeforeAdjust.K1;
                            num = (float)(binInfo.ModelOriPathLoss - temp);
                        }
                        else
                        {
                            double distance = System.Math.Pow(10, binInfo.LogDistance);
                            ITUR230PathLossCalculator.k1 = spmModel.K1;
                            num = (float)ITUR230PathLossCalculator.getLoss(binInfo.Frequency, distance / 1000, (double)num3, 10, binInfo.ReceiverHeight);

                        }
                        //num = (((((spmModel.K1 + (spmModel.K2 * binInfo.LogDistance)) + (spmModel.K3 * num4)) + (spmModel.K4 * num5)) + ((spmModel.K5 * binInfo.LogDistance) * num4)) + (spmModel.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (spmModel.K7 * num2);
                        
                        binInfo.ModelAdjPathLoss = num;
                        binInfo.ModelAdjError = (binInfo.ActualPathLoss - binInfo.ModelAdjPathLoss) / spmModel.K7;
                        this.m_DeltaPathLossMatrixList.Add(binInfo.ModelAdjError);
                    }
                }
            base.deltaPathLossMatrix = new float[this.m_DeltaPathLossMatrixList.Count];
            base.deltaPathLossMatrix = this.m_DeltaPathLossMatrixList.ToArray();
        }
예제 #4
0
파일: SPMAdjustDT.cs 프로젝트: xiaoyj/Space
 private void CalculateModelPathLoss(IList<BinInformation> binInfoList, CWFileInformation fileInfo)
 {
     float num = 0f;
     int num2 = 1;
     int num3 = 1;
     foreach (BinInformation binInfo in binInfoList)
     {
         if (!binInfo.IsValid)
         {
             continue;
         }
         GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint);
         short[] altitudes = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Height);
         short[] buildHeights = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Building);
         short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter);
         float num4 = 0f;
         if (base.repeatTimes == 1)
         {
             num4 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, base.modelBeforeAdjust, fileInfo.CellInfo.Resolution);
         }
         else
         {
             num4 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, base.modelAfterAdjust, fileInfo.CellInfo.Resolution);
         }
         float[] numArray4 = (this.m_ClutterLossMethod == null) ? null : this.m_ClutterLossMethod.CalcPointClutterProportion(clutters, base.modelBeforeAdjust, fileInfo.CellInfo.Resolution, base.m_ClutterTypeNum);
         float num5 = (this.m_EffTxHeightMethod == null) ? this.m_SectionPathLossCalcParam.TxAntennaHeight : this.m_EffTxHeightMethod.CalcPointEffTxHt(this.m_SectionPathLossCalcParam, altitudes);
         float num6 = (this.m_DiffractionLossCalculator == null) ? 0f : this.m_DiffractionLossCalculator.GetPTPDiffractionLoss(altitudes, binInfo.Distance, buildHeights, clutters);
         float num7 = (float) Math.Log10((double) num5);//发射天线的有效高度/dB
         if ((++num2 % 10) == 0)
         {
             this.m_UseTime = ((num3 * base.repeatTimes) * this.m_TotalFileIndex) + ((int) ((((float) num2) / ((float) binInfoList.Count)) * num3));
             this.m_StatusBarService.SetCurProgress(this.m_UseTime);
         }
         if (this.m_DataForAdjust.m_propModel.PropModelName == "ITUR-LTE230")
         {
             double distance = System.Math.Pow(10, binInfo.LogDistance);
             ITUR230PathLossCalculator.k1 = base.modelBeforeAdjust.K1;
             num = (float)ITUR230PathLossCalculator.getLoss(binInfo.Frequency, distance / 1000, (double)num5, 10, binInfo.ReceiverHeight);
         }
         else if (this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata")
         {
             float Altha_hr=(float)((1.11*Math.Log10(binInfo.Frequency)-0.7)*num5-(1.56*Math.Log10(binInfo.Frequency)-0.8));//中小城市接收天线校正
             float Ccell=0;//城市小区类型校正
             float Cterrain=base.modelBeforeAdjust.K1;
             num = (float)(69.55 + 26.16 * Math.Log10(binInfo.Frequency) - 13.82 * num7 + (44.9 - 6.55 * num7) * binInfo.LogDistance - Altha_hr + Ccell - Cterrain);
         }
         else
         {
             num = (((((base.modelBeforeAdjust.K1 + (base.modelBeforeAdjust.K2 * binInfo.LogDistance)) + (base.modelBeforeAdjust.K3 * num7)) + (base.modelBeforeAdjust.K4 * num6)) + ((base.modelBeforeAdjust.K5 * binInfo.LogDistance) * num7)) + (base.modelBeforeAdjust.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (base.modelBeforeAdjust.K7 * num4);
         }
         binInfo.ClutterLoss = num4;
         binInfo.DiffLoss = num6;
         if (base.repeatTimes == 1)
         {
             binInfo.ModelOriPathLoss = num;
         }
         binInfo.ClutterProportion = numArray4;
     }
 }
예제 #5
0
파일: SPMAdjustDT.cs 프로젝트: xiaoyj/Space
 private void CalculateActualPathLoss(IList<BinInformation> binInfoList, CWFileInformation fileInfo)
 {
     StructAntennaParam calAntennaParam = fileInfo.AntennaPara;
     calAntennaParam.AntHeight = base.m_GeoDataObserver.IGeoProvider.GetGeoInfo.GetValueByGeoXYPoint(fileInfo.CellInfo.XYPoint, DemDataType.Height);
     foreach (BinInformation binInfo in binInfoList)
     {
         if (binInfo.IsValid)
         {
             base.validDataNumber++;
             calAntennaParam.MsX = binInfo.XYPoint.X;
             calAntennaParam.MsY = binInfo.XYPoint.Y;
             calAntennaParam.MsHeight = base.m_GeoDataObserver.IGeoProvider.GetGeoInfo.GetValueByGeoXYPoint(binInfo.XYPoint, DemDataType.Height);
             float num = this.CalSFadingMarginAndPentroless(binInfo);
             binInfo.ActualPathLoss = (((fileInfo.CellInfo.TxPower - calAntennaParam.AntConfigSetUp.DlTotalLoss) - num) + this.m_antennaGain.Calculate3DGain(calAntennaParam)) - binInfo.AverageEC;
         }
     }
 }
예제 #6
0
 public void EncapsulationCwTree()
 {
     foreach (KeyValuePair<string, IList<BinInformation>> pair in base.m_anaCWFile.CWFileInfo.CellBinInfoDic)
     {
         TreeNode child = this.m_MeasurementNode.ChildNode(pair.Key);
         if (child == null)
         {
             child = new TreeNode(pair.Key);
             this.m_MeasurementNode.AddChildNodeToParent(this.m_MeasurementNode.RootNode, child);
         }
         TreeNode node2 = new TreeNode(base.m_anaCWFile.CWFileInfo.FileName);
         MeasurementView.IDCreator++;
         node2.Tag = MeasurementView.IDCreator;
         string text = base.m_anaCWFile.CWFileInfo.FileName + node2.GetHashCode();
         base.m_anaCWFile.CWFileInfo.FileNameIdentifier = text;
         node2.Name = text;
         this.m_MeasurementNode.AddChildNodeToParent(child, node2);
         CWFileInformation item = new CWFileInformation();
         item.FileNameIdentifier = text;
         item.FileName = base.m_anaCWFile.CWFileInfo.FileName;
         item.BinInfoHeader = base.m_anaCWFile.CWFileInfo.BinInfoHeader;
         item.CellBinInfoDic.Add(pair.Key, pair.Value);
         item.CellInfo = base.m_anaCWFile.CWFileInfo.CellInfo;
         item.AntennaPara = base.m_anaCWFile.CWFileInfo.AntennaPara;
         this.m_cwFileInfoList.Add(item);
         base.m_AddedTreeNodes.Add(node2);
     }
 }