Ejemplo n.º 1
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            a        = EllipsoidType.A();
            lambda_0 = MathUtil.Radians(CentralMeridian);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            a  = EllipsoidType.A();
            e2 = EllipsoidType.E2();
            e  = Math.Sqrt(e2);
            e4 = e2 * e2;
            e6 = e4 * e2;
            e8 = e4 * e4;

            lambda_0 = MathUtil.Radians(CentralMeridian);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            double phi_s     = MathUtil.Radians(StandardParallel);
            double sinphi_s  = Math.Cos(phi_s);
            double sin2phi_s = sinphi_s * sinphi_s;

            a        = EllipsoidType.A();
            e2       = EllipsoidType.E2();
            e        = Math.Sqrt(e2);
            e4       = e2 * e2;
            e6       = e4 * e2;
            cosphi_s = Math.Cos(phi_s);
            lambda_0 = MathUtil.Radians(LongitudeOrigin);
            k_0      = cosphi_s / Math.Sqrt(1 - e2 * sin2phi_s);                                // 10-13
            q_p      = (1 - e2) * (1 / (1 - e2) - (1 / (2 * e)) * Math.Log((1 - e) / (1 + e))); // 3-12 with phi=90 degrees
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            a        = EllipsoidType.A();
            e2       = EllipsoidType.E2();
            e4       = e2 * e2;
            e6       = e4 * e2;
            e8       = e6 * e2;
            e        = Math.Sqrt(e2);
            k_0      = ScaleFactor;
            phi_0    = MathUtil.Radians(LatitudeOrigin);
            lambda_c = MathUtil.Radians(LongitudeOrigin);

            alpha_c    = MathUtil.Radians(Azimuth);
            sinalpha_c = Math.Sin(alpha_c);
            cosalpha_c = Math.Cos(alpha_c);

            double sinphi_0  = Math.Sin(phi_0);
            double sin2phi_0 = sinphi_0 * sinphi_0;
            double sin4phi_0 = sin2phi_0 * sin2phi_0;

            double cosphi_0  = Math.Cos(phi_0);
            double cos2phi_0 = cosphi_0 * cosphi_0;
            double cos4phi_0 = cos2phi_0 * cos2phi_0;

            B = Math.Sqrt(1 + e2 * cos4phi_0 / (1 - e2));                                                              // 9-11
            A = a * B * k_0 * Math.Sqrt(1 - e2) / (1 - e2 * sin2phi_0);                                                // 9-12
            double t_0 = Math.Tan(Math.PI / 4 - phi_0 / 2) / Math.Pow((1 - e * sinphi_0) / (1 + e * sinphi_0), e / 2); // 9-13
            double D   = B * Math.Sqrt(1 - e2) / (cosphi_0 * Math.Sqrt(1 - e2 * sin2phi_0));                           // 9-14

            double D2 = Math.Max(D * D, 1.0);
            double F  = D + Math.Sign(phi_0) * Math.Sqrt(D2 - 1);                        // 9-35

            E = F * Math.Pow(t_0, B);                                                    // 9-36
            double G       = (F - 1 / F) / 2;                                            // 9-19
            double gamma_0 = Math.Asin(sinalpha_c / D);                                  // 9-37

            singamma_0 = Math.Sin(gamma_0);
            cosgamma_0 = Math.Cos(gamma_0);

            lambda_0 = lambda_c - Math.Asin(G * Math.Tan(gamma_0)) / B;                  // 9-38
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            k_0  = ScaleFactor;
            a    = EllipsoidType.A();
            e2   = EllipsoidType.E2();
            e4   = e2 * e2;
            e6   = e4 * e2;
            ep2  = EllipsoidType.Ep2();
            e_1  = (1 - Math.Sqrt(1 - e2)) / (1 + Math.Sqrt(1 - e2));
            e2_1 = e_1 * e_1;
            e3_1 = e2_1 * e_1;
            e4_1 = e3_1 * e_1;

            lambda_0 = MathUtil.Radians(CentralMeridian);
            phi_0    = MathUtil.Radians(LatitudeOrigin);

            M_0 = a * ((1 - e2 / 4 - 3 * e4 / 64 - 5 * e6 / 256 /* - ... */) * phi_0 - (3 * e2 / 8 + 3 * e4 / 32 + 45 * e6 / 1024 /* + ... */) * Math.Sin(2 * phi_0) + (15 * e4 / 256 + 45 * e6 / 1024 /* + ... */) * Math.Sin(4 * phi_0) - (35 * e6 / 3072 /* + ... */) * Math.Sin(6 * phi_0) /* + ... */);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 根据类型,获取指定的椭球。
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static Ellipsoid GetEllipsoid(EllipsoidType type)
        {
            switch (type)
            {
            case EllipsoidType.CGCS2000:
                return(Ellipsoid.CGCS2000);

            case EllipsoidType.BJ54:
                return(Ellipsoid.BeiJing54);

            case EllipsoidType.WGS84:
                return(Ellipsoid.WGS84);

            case EllipsoidType.PZ90:
                return(Ellipsoid.PZ90);

            case EllipsoidType.XA80:
                return(Ellipsoid.XiAn80);

            default:
                return(Ellipsoid.WGS84);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Updates the constants.
        /// </summary>
        protected override void UpdateConstants()
        {
            base.UpdateConstants();

            a  = EllipsoidType.A();
            e2 = EllipsoidType.E2();
            e  = Math.Sqrt(e2);

            e4 = e2 * e2;
            e6 = e4 * e2;
            e8 = e4 * e4;

            double phi_0 = MathUtil.Radians(LatitudeOrigin);
            double phi_1 = MathUtil.Radians(StandardParallelSouth);
            double phi_2 = MathUtil.Radians(StandardParallelNorth);

            lambda_0 = MathUtil.Radians(CentralMeridian);

            double cosphi_1 = Math.Cos(phi_1);
            double sinphi_1 = Math.Sin(phi_1);
            double m_1      = cosphi_1 / Math.Sqrt(1 - e2 * sinphi_1 * sinphi_1);                                                  // 14-15(1)
            double t_1      = Math.Sqrt(((1 - sinphi_1) / (1 + sinphi_1)) * Math.Pow((1 + e * sinphi_1) / (1 - e * sinphi_1), e)); // 15-9a(1)

            double cosphi_2 = Math.Cos(phi_2);
            double sinphi_2 = Math.Sin(phi_2);
            double m_2      = cosphi_2 / Math.Sqrt(1 - e2 * sinphi_2 * sinphi_2);                                                  // 14-15(2)
            double t_2      = Math.Sqrt(((1 - sinphi_2) / (1 + sinphi_2)) * Math.Pow((1 + e * sinphi_2) / (1 - e * sinphi_2), e)); // 15-9a(2)

            n = (Math.Log(m_1) - Math.Log(m_2)) / (Math.Log(t_1) - Math.Log(t_2));                                                 // 15-8
            F = m_1 / (n * Math.Pow(t_1, n));                                                                                      // 15-10

            double sinphi_0 = Math.Sin(phi_0);

            double t_0 = Math.Sqrt(((1 - sinphi_0) / (1 + sinphi_0)) * Math.Pow((1 + e * sinphi_0) / (1 - e * sinphi_0), e));   // 15-9a(2)

            rho_0 = a * F * Math.Pow(t_0, n);                                                                                   // 15-7(a)
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 设置椭球
 /// </summary>
 /// <param name="ellipsoidType"></param>
 public void SetEllipsoidType(EllipsoidType ellipsoidType)
 {
     this.enumRadioControl_ellipsoidType.SetCurrent <EllipsoidType>(ellipsoidType);
 }