Beispiel #1
0
        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();
        }
Beispiel #2
0
 private void CalculateModelPathLoss(IList<FileInfoBase> dtFileList, SpmPropagationModel spmModel, bool isAdjustClutter)
 {
     int num = 1;
     float num2 = 1.5f;
     foreach (CWFileInformation fileInfo in dtFileList)
     {
             foreach (BinInformation binInfo in fileInfo.BinInfoList)
             {
                 if (binInfo.IsValid)
                 {
                     GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint);
                     short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter);
                     float num3 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, spmModel, fileInfo.CellInfo.Resolution);
                     binInfo.ModelAdjPathLoss += num3 * spmModel.K7;
                     binInfo.ModelAdjError = binInfo.ActualPathLoss - binInfo.ModelAdjPathLoss;
                     if ((++num % 10) == 0)
                     {
                         this.m_UseTime1 = (int) ((((num2 * base.repeatTimes) * 0.1) * this.tempFileIndex) + ((((float) num) / ((float) fileInfo.BinInfoList.Count)) * num2));
                         this.m_StatusBarService.SetCurProgress(this.m_UseTime + this.m_UseTime1);
                     }
                 }
             }
         this.tempFileIndex++;
     }
 }
Beispiel #3
0
 public override void Init(IPropagationModel propModel, IBaseService context)
 {
     IPropaGeoDataObserver observer = ServiceHelper.Lookup<IPropaGeoDataObserver>(context);
     if ((propModel.GisClutterDictionary.Count == 0) && (observer.GisClutterDictionary.Count > 0))
     {
         propModel.GisClutterDictionary = observer.GisClutterDictionary;
     }
    
     base.Init(propModel, context, Resources.PropModelPropertiesXmlStr);
     this.m_PropModel = base.m_editPropModel as SpmPropagationModel;
     this.dgvClutterLoss.AllowUserToDeleteRows = false;
     this.dgvClutterLoss.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(this.dgvClutterLoss_EditingControlShowing);
     this.dgvClutterLoss.CellValidating += new DataGridViewCellValidatingEventHandler(this.dgvClutterLoss_CellValidating);
     this.dgvClutterLoss.CellValueChanged += new DataGridViewCellEventHandler(this.dgvClutterLoss_CellValueChanged);
     this.gridParameters.PropertyValueChanged += new PropertyValueChangedEventHandler(this.gridParameters_PropertyValueChanged);   //add by liujialin 5.15
     this.InitClutterLossLissView();
     this.m_PropagModelCollection = ServiceHelper.Lookup<IPropagModelCollection>(context);
 }