Example #1
0
        /// <summary>
        /// 保存路损值 山峰高度和位置
        /// </summary>
        /// <param name="losData"></param>
        /// <param name="rayIndex"></param>
        /// <param name="peakinfo"></param>
        /// <param name="sectionIndex"></param>
        protected void WriteSectionLos(ref SectorPathLossData losData, int rayIndex, PeakInfoTemp peakinfo, byte sectionIndex)
        {
            for (int i = 0; i < peakinfo.RayLosMatrix.Length; i++)
            {
                losData.SetValue(sectionIndex, rayIndex, i, peakinfo.RayLosMatrix[i]);

                losData.SetHeightValue(sectionIndex, rayIndex, i, peakinfo.PeakHeightMatrix[i]);

                losData.SetDotValue(sectionIndex, rayIndex, i, peakinfo.PeakDotMatrix[i]);
            }
        }
Example #2
0
        /// <summary>
        /// 计算扇形区域的路径损耗
        /// </summary>
        /// <param name="losData"></param>
        /// <param name="sectionParam"></param>
        /// <param name="isStopCalculator"></param>
        public void CalculateSectionPathLoss(ref SectorPathLossData losData, SectionPathLossCalcParam sectionParam, ref bool isStopCalculator)
        {
            GisPreLoadData clutterData;
            GisPreLoadData heightData;
            GisPreLoadData buildingHeightData;
            m_SectionPathLossCalcParam = sectionParam;
            DiffCalcPreProcess(sectionParam);
            Dictionary<DemDataType, GisPreLoadData> gisData = new Dictionary<DemDataType, GisPreLoadData>();
            PreLoadGisData(out clutterData, out heightData, out buildingHeightData, sectionParam);
            gisData.Add(DemDataType.Clutter, clutterData);
            gisData.Add(DemDataType.Height, heightData);
            gisData.Add(DemDataType.Building, buildingHeightData);
            if (!(AntConfig.IS_ANTENNA_HEIGHT_INCLUDE_BUILDING || !GeoDataProvider.IGeoProvider.IsBuildingLoaded))
            {
                GeoXYPoint pnt = new GeoXYPoint((double) sectionParam.X, (double) sectionParam.Y);
                sectionParam.TxAntennaHeight += GeoDataProvider.GisInfo.GetValueByGeoXYPoint(pnt, DemDataType.Building, false);
            }
            short rayNumber = sectionParam.GetRayNumber();

            #region oldCode 2012.9.24

            //for (int i = 0; i < rayNumber; i++)
            //{
            //    m_RayIndex = i;
            //    RayMethodParam rayParam = BuildCalcParam(sectionParam, i, gisData);
            //    float[] rayLos = CalculateRayPathLoss(rayParam, sectionParam.PropagModel, ref isStopCalculator);
            //    WriteSectionLos(ref losData, i, rayLos, sectionParam.SectionIndex);
            //}

            #endregion

            #region modified 2012.9.24

            PeakInfoTemp peakInfo = new PeakInfoTemp();

            for (int i = 0; i < rayNumber; i++)//开始遍历每条射线 每条射线取80个采样点 一共80*502个采样点 分别算出路损
            {
                m_RayIndex = i;

                RayMethodParam rayParam = BuildCalcParam(sectionParam, i, gisData);
              
                float[] rayLos = CalculateRayPathLoss(rayParam, sectionParam.PropagModel, ref isStopCalculator);

                peakInfo.RayLosMatrix = rayLos;
                peakInfo.PeakDotMatrix = rayParam.PeakDotMatrix;
                peakInfo.PeakHeightMatrix = rayParam.PeakHeightMatrix;

                WriteSectionLos(ref losData, i, peakInfo, sectionParam.SectionIndex);
            }
            #endregion
        }