Ejemplo n.º 1
0
        /// <summary>
        /// 将高斯平面坐标转化为大地坐标
        /// </summary>
        /// <param name="gxyH">高斯平面坐标</param>
        /// <returns>大地坐标</returns>
        private GeoBLH ConvertxyHToBLH(GeoxyH gxyH)
        {
            int    beltNo = (int)(gxyH.gy / 1000000.0);
            double y      = gxyH.gy % 1000000.0 - 500000.0;
            double Bf     = GeodeticCalculate.LengthOfMeridianAntiCaculate(re, gxyH.gx);
            double tf     = Math.Tan(Bf / Angle.Rou);
            double cosbf  = Math.Cos(Bf / Angle.Rou);
            double yitaf  = re.firste2 * cosbf * cosbf;
            double Mf     = GeodeticCalculate.MeridianCircleRadius(re, Bf);
            double Nf     = GeodeticCalculate.UnitaryCircleRadius(re, Bf);
            double b1     = -(tf * Math.Pow(y, 2) / (2.0 * Mf * Nf));
            double b2     = tf * (5 + 3 * Math.Pow(tf, 2) + yitaf - 9 * yitaf * tf * tf) * Math.Pow(y, 4) / (24 * Mf * Math.Pow(Nf, 3));
            double b3     = -(tf * Math.Pow(y, 6)) * (61 + 90 * tf * tf + 45 * tf * tf * tf * tf) / (720 * Mf * Math.Pow(Nf, 5));
            double B      = Bf / Angle.Rou + b1 + b2 + b3;
            double L      = y / (Nf * cosbf) - Math.Pow(y, 3) * (1 + 2 * tf * tf + yitaf) / (6 * Math.Pow(Nf, 3) * cosbf) + Math.Pow(y, 5) * (5 + 28 * tf * tf + 24 * Math.Pow(tf, 4) + 6 * yitaf + 8 * yitaf * tf * tf) / (120 * Math.Pow(Nf, 5) * cosbf);
            double _B     = Bf + (b1 + b2 + b3) * Angle.Rou;
            double _L     = L * Angle.Rou + beltNo * 6.0 * 3600 - 3.0 * 3600;
            double _H     = gxyH.gH;

            return(new GeoBLH(_B, _L, _H));
        }