Exemple #1
0
        /*!
         * 功能 路长影响计算
         * 参数 roadLine 声源线
         *      receiveePoint 接收点
         * 返回值 路长影响值
         * 版本号 1.0
         * 作者 樊晓剑
         * 创建时间  2016年7月12日
         * 修改时间
         */
        private double roadLengthAffect(Geometry roadLine, Geometry receivePoint)
        {
            //公路弯曲或有限长路段引起的交通噪声修正量∆L_1的计算
            double angle = AngleUtility.AngleBetween(new Coordinate(roadLine.GetX(0), roadLine.GetY(0)),
                                                     new Coordinate(receivePoint.GetX(0), receivePoint.GetY(0)),
                                                     new Coordinate(roadLine.GetX(roadLine.GetPointCount() - 1), roadLine.GetY(roadLine.GetPointCount() - 1)));
            double L_1 = 10 * Math.Log10(angle / Math.PI);


            return(L_1);
        }
Exemple #2
0
            public int CompareTo(ObstacleGraphLine other)
            {
                if (Id == other.Id || EqualsTopologicallyWithTolerance(Line, other.Line))
                {
                    return(0);
                }

                var rayP0      = CorrespondingRay.P0;
                var rayP1      = CorrespondingRay.P1;
                var param      = GetRayParameter(rayP0, rayP1, Line.P0, Line.P1);
                var otherParam = GetRayParameter(rayP0, rayP1, other.Line.P0, other.Line.P1);

                // You should allow for tolerance when comparing doubles
                if (param.EqualsWithEps(otherParam, tol))
                {
                    return(Comparer <double> .Default.Compare(AngleUtility.AngleBetween(rayP0, rayP1, GetAdjacentPoint(rayP1)),
                                                              AngleUtility.AngleBetween(rayP0, rayP1, other.GetAdjacentPoint(rayP1))));
                }

                return(Comparer <double> .Default.Compare(param, otherParam));
            }