当前位置: 首页>>代码示例>>C#>>正文


C# Transceiver.GetAntConfig方法代码示例

本文整理汇总了C#中Transceiver.GetAntConfig方法的典型用法代码示例。如果您正苦于以下问题:C# Transceiver.GetAntConfig方法的具体用法?C# Transceiver.GetAntConfig怎么用?C# Transceiver.GetAntConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transceiver的用法示例。


在下文中一共展示了Transceiver.GetAntConfig方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetOnePointBackhaulPathLoss

 /// <summary>
 /// 获取backhaul单点路损
 /// </summary>
 /// <param name="trans"></param>
 /// <param name="cellID"></param>
 /// <param name="sectorID"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="resolution"></param>
 /// <param name="isGetAntGain"></param>
 /// <returns></returns>
 private float[][] GetOnePointBackhaulPathLoss(Transceiver trans, short cellID, int sectorID, double x, double y, float resolution, bool isGetAntGain)
 {
     float[][] pathLossMatrix = new float[][] { new float[2] };
     if (this.m_PathLossCellData.TransBackhaulPathLossMatrixList.Count != 0)
     {
         TransceiverPathLossMatrix transceiverPathLossMatrix = FindBackhaulMatrix(sectorID, cellID);
         if ((transceiverPathLossMatrix == null) || this.RangeXY(x, y, transceiverPathLossMatrix))
         {
             pathLossMatrix[0][0] = float.MinValue;
             pathLossMatrix[0][1] = float.MinValue;
             return pathLossMatrix;
         }
         double distance = this.GetDistance(trans, sectorID, x, y);
         int xIndex = (int)((x - transceiverPathLossMatrix.LeftTopX) / ((double)transceiverPathLossMatrix.Resolution));
         int yIndex = (int)((transceiverPathLossMatrix.LeftTopY - y) / ((double)transceiverPathLossMatrix.Resolution));
         int delayIndex = this.GetDelayIndex(xIndex, yIndex, transceiverPathLossMatrix);
         if (this.IsMatixInvalid(transceiverPathLossMatrix, delayIndex))
         {
             pathLossMatrix[0][1] = float.MinValue;
             pathLossMatrix[0][0] = float.MinValue;
         }
         else if (this.IsUsingMatrixs(x, y, resolution, transceiverPathLossMatrix))
         {
             float deltaLoss = GetBackhaulDeltaLoss(trans, x, y, distance);
             GetExistsPLMatrix(isGetAntGain, pathLossMatrix, transceiverPathLossMatrix, delayIndex, deltaLoss);
         }
         else
         {
             StructAntennaParam calAntennaParam = new StructAntennaParam();
             calAntennaParam.CellX = trans.Parent.X + trans.GetAntConfig(sectorID).DX;
             calAntennaParam.CellY = trans.Parent.Y + trans.GetAntConfig(sectorID).DY;
             calAntennaParam.IsSimple = false;
             calAntennaParam.AntHeight = this.m_IGeoInfo.GetValueByGeoXYPoint(calAntennaParam.CellX, calAntennaParam.CellY, DemDataType.Height);
             //用户的坐标
             calAntennaParam.MsX = x;
             calAntennaParam.MsY = y;
             calAntennaParam.MsHeight = this.m_IGeoInfo.GetValueByGeoXYPoint(x, y, DemDataType.Height);
             float num6 = transceiverPathLossMatrix.LeftTopX + (xIndex * transceiverPathLossMatrix.Resolution);
             float dX = (float)((x - num6) / ((double)transceiverPathLossMatrix.Resolution));
             float num8 = transceiverPathLossMatrix.LeftTopY - (yIndex * transceiverPathLossMatrix.Resolution);
             float dY = (float)((num8 - y) / ((double)transceiverPathLossMatrix.Resolution));
             pathLossMatrix[0][1] = this.getPathLossByWeight(xIndex, yIndex, dX, dY, transceiverPathLossMatrix);
             float antGain = 0f;
             if (isGetAntGain)
             {
                 calAntennaParam.AntConfigSetUp = trans.GetAntConfig(sectorID);
                 antGain = this.m_AntennaGainCalculator.Calculate3DGain(calAntennaParam);
             }
             this.SetBackhaulMatrix(pathLossMatrix, x, y, trans, antGain, distance);
         }
     }
     return pathLossMatrix;
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:64,代码来源:PLCalcDataVstr.cs

示例2: GetDistance

 private double GetDistance(Transceiver trans, int sectorID, double x, double y)
 {
     GeoXYPoint point = new GeoXYPoint(trans.Parent.X + trans.GetAntConfig(sectorID).DX, trans.Parent.Y + trans.GetAntConfig(sectorID).DY);
     GeoXYPoint point2 = new GeoXYPoint(x, y);
     return point.Distance(point2);
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:6,代码来源:PLCalcDataVstr.cs


注:本文中的Transceiver.GetAntConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。