public Result PostRayTracing([FromBody] CellRayTracingModel rt)
 {
     return(rt.calc(loadInfo: true));
 }
        public List <CellRayTracingModel> interfeCellGen(DataRange dataRange)
        {
            List <CellRayTracingModel> res = new List <CellRayTracingModel>();
            Point pMin = new Point();

            pMin.X = dataRange.minLongitude;
            pMin.Y = dataRange.minLatitude;
            pMin.Z = 0;
            LTE.Utils.PointConvertByProj.Instance.GetProjectPoint(pMin);

            Point pMax = new Point();

            pMax.X = dataRange.maxLongitude;
            pMax.Y = dataRange.maxLatitude;
            pMax.Z = 0;
            LTE.Utils.PointConvertByProj.Instance.GetProjectPoint(pMax);

            double      maxBh       = 90;   //最大建筑物高度
            int         radius      = 1200; //干扰源覆盖半径
            String      tarBaseName = dataRange.infAreaId + "_";
            List <CELL> cells       = new List <CELL>();
            int         batch       = 10;
            int         cnt         = 0;

            //计算测试数据总数
            int    lx       = (int)Math.Ceiling((pMax.X - pMin.X) / dataRange.tarGridX);
            int    ly       = (int)Math.Ceiling((pMax.Y - pMin.Y) / dataRange.tarGridY);
            int    lz       = (int)Math.Ceiling(maxBh / dataRange.tarGridH);
            long   uidBatch = long.Parse((lx * ly * lz).ToString());
            String dbName   = "CELL";
            int    initOff  = 1500000;
            int    uid      = (int)UIDHelper.GenUIdByRedis(dbName, uidBatch) + initOff;

            for (double x = pMin.X; x < pMax.X; x += dataRange.tarGridX)
            {
                for (double y = pMin.Y; y < pMax.Y; y += dataRange.tarGridY)
                {
                    for (double z = 30; z <= maxBh; z += 30)
                    {
                        cnt++;
                        Random r    = new Random(uid);
                        CELL   cELL = new CELL();
                        cELL.ID             = uid;
                        cELL.CellName       = dataRange.infAreaId + "_" + uid;
                        cELL.Altitude       = 13;
                        cELL.AntHeight      = (decimal)z;
                        cELL.x              = (decimal)x;
                        cELL.y              = (decimal)y;
                        cELL.CI             = uid;
                        cELL.eNodeB         = uid;
                        cELL.EIRP           = 32;
                        cELL.Azimuth        = 0;
                        cELL.Tilt           = r.Next(4, 16); //下倾角范围4~16之间随机取
                        cELL.EARFCN         = 63;
                        cELL.CoverageRadius = radius;
                        cells.Add(cELL);

                        CellRayTracingModel rayCell = new CellRayTracingModel();
                        rayCell.cellName         = cELL.CellName;
                        rayCell.reflectionNum    = 3;
                        rayCell.diffPointsMargin = 5;
                        rayCell.diffractionNum   = 2;
                        rayCell.threadNum        = 3;
                        rayCell.incrementAngle   = 180;
                        rayCell.computeIndoor    = false;
                        rayCell.computeDiffrac   = true;
                        rayCell.distance         = radius;
                        res.Add(rayCell);

                        uid++;
                    }
                    if (res.Count >= batch)
                    {
                        IbatisHelper.ExecuteInsert("CELL_BatchInsert", cells);
                        cells.Clear();
                    }
                }
            }
            if (cells.Count > 0)
            {
                IbatisHelper.ExecuteInsert("CELL_BatchInsert", cells);
            }

            return(res);
        }