Exemplo n.º 1
0
 public string[] ToLines()
 {
     return(new string[] {
         A1.ToString(), A2.ToString(), A3.ToString(),
         B1.ToString(), B2.ToString(), B3.ToString(),
         C1.ToString(), C2.ToString(), C3.ToString(),
         Start.ToString()
     });
 }
Exemplo n.º 2
0
 private void FemSelect_Load(object sender, EventArgs e)
 {
     if (this.PailieMode == 3)
     {
         this.buttonX1.Visible = true; this.textBoxX29.Visible = true; this.textBoxX30.Visible = true; this.textBoxX31.Visible = true; this.textBoxX32.Visible = true; this.textBoxX33.Visible = true;
     }
     else
     {
         this.buttonX1.Visible = false; this.textBoxX29.Visible = false; this.textBoxX30.Visible = false; this.textBoxX31.Visible = false; this.textBoxX32.Visible = false; this.textBoxX33.Visible = false;
     }
     if (this.isOneOrTwo == 0)
     {
         this.textBoxX1.Text  = "情况一组合方式";
         this.textBoxX8.Text  = A1.ToString();
         this.textBoxX9.Text  = A2.ToString();
         this.textBoxX10.Text = A3.ToString();
         this.textBoxX20.Text = B1.ToString();
         this.textBoxX21.Text = B2.ToString();
         this.textBoxX22.Text = B3.ToString();
         this.textBoxX23.Text = C1.ToString();
         this.textBoxX24.Text = C2.ToString();
         this.textBoxX25.Text = C3.ToString();
         this.textBoxX26.Text = D1.ToString();
         this.textBoxX27.Text = D2.ToString();
         this.textBoxX28.Text = D3.ToString();
     }
     else if (this.isOneOrTwo == 1)
     {
         this.textBoxX1.Text  = "情况二组合方式";
         this.textBoxX8.Text  = A1.ToString();
         this.textBoxX9.Text  = A2.ToString();
         this.textBoxX10.Text = A3.ToString();
         this.textBoxX20.Text = B1.ToString();
         this.textBoxX21.Text = B2.ToString();
         this.textBoxX22.Text = B3.ToString();
         this.textBoxX23.Text = C1.ToString();
         this.textBoxX24.Text = C2.ToString();
         this.textBoxX25.Text = C3.ToString();
         this.textBoxX26.Text = D1.ToString();
         this.textBoxX27.Text = D2.ToString();
         this.textBoxX28.Text = D3.ToString();
     }
 }
Exemplo n.º 3
0
        private void button8_Click(object sender, EventArgs e)
        {
            double CGCSa = 6378137.0, CGCSf = 1 / 298.257222101;
            double CGCSb = CGCSa * (1 - CGCSf);
            double CGCSe = Math.Sqrt(CGCSa * CGCSa - CGCSb * CGCSb) / CGCSa;
            double CGCSe1 = Math.Sqrt(CGCSa * CGCSa - CGCSb * CGCSb) / CGCSb;
            double B, L, H, X, Y, Z;

            X = double.Parse(textBox10.Text);
            Y = double.Parse(textBox11.Text);
            Z = double.Parse(textBox12.Text);
            double CGCSu = Math.Atan((CGCSa * Z) / (CGCSb * Math.Sqrt(X * X + Y * Y)));

            B = Math.Atan((Z + CGCSe1 * CGCSe1 * CGCSb * Math.Pow(Math.Sin(CGCSu), 3)) / (Math.Sqrt(X * X + Y * Y) - CGCSe * CGCSe * CGCSa * Math.Pow(Math.Cos(CGCSu), 3)));
            L = Math.Atan2(Y, X);
            double WGSw = Math.Sqrt(1 - Math.Pow(CGCSe * Math.Sin(B), 2));
            double WGSn = CGCSa / WGSw;

            H = Math.Sqrt(X * X + Y * Y) / Math.Cos(B) - WGSn;
            B = B * 180 / Math.PI;
            L = L * 180 / Math.PI;
            double B1, B2, B3;

            B1 = Math.Truncate(B);
            B2 = Math.Truncate((B - B1) * 60);
            B3 = ((B - B1) * 60 - B2) * 60;
            string strB = B1.ToString() + '.' + B2.ToString() + B3.ToString("f6");
            double L1, L2, L3;

            L1 = Math.Truncate(L);
            L2 = Math.Truncate((L - L1) * 60);
            L3 = ((L - L1) * 60 - L2) * 60;
            string strL = L1.ToString() + '.' + L2.ToString() + L3.ToString("f6");

            textBox4.Text = strB;
            textBox5.Text = strL;
            textBox6.Text = H.ToString("f4");
        }
Exemplo n.º 4
0
        private void button6_Click(object sender, EventArgs e)
        {
            double WGSa = 6378137.0, WGSb = 6356752.3;
            double WGSe = Math.Sqrt(WGSa * WGSa - WGSb * WGSb) / WGSa;
            double WGSe1 = Math.Sqrt(WGSa * WGSa - WGSb * WGSb) / WGSb;
            double B, L, H, X, Y, Z;

            X = double.Parse(textBox7.Text);
            Y = double.Parse(textBox8.Text);
            Z = double.Parse(textBox9.Text);
            double WGSu = Math.Atan((WGSa * Z) / (WGSb * Math.Sqrt(X * X + Y * Y)));

            B = Math.Atan((Z + WGSe1 * WGSe1 * WGSb * Math.Pow(Math.Sin(WGSu), 3)) / (Math.Sqrt(X * X + Y * Y) - WGSe * WGSe * WGSa * Math.Pow(Math.Cos(WGSu), 3)));
            L = Math.Atan2(Y, X);
            double WGSw = Math.Sqrt(1 - Math.Pow(WGSe * Math.Sin(B), 2));
            double WGSn = WGSa / WGSw;

            H = Math.Sqrt(X * X + Y * Y) / Math.Cos(B) - WGSn;
            B = B * 180 / Math.PI;
            L = L * 180 / Math.PI;
            double B1, B2, B3;

            B1 = Math.Truncate(B);
            B2 = Math.Truncate((B - B1) * 60);
            B3 = ((B - B1) * 60 - B2) * 60;
            string strB = B1.ToString() + '.' + B2.ToString() + B3.ToString("f6");
            double L1, L2, L3;

            L1 = Math.Truncate(L);
            L2 = Math.Truncate((L - L1) * 60);
            L3 = ((L - L1) * 60 - L2) * 60;
            string strL = L1.ToString() + '.' + L2.ToString() + L3.ToString("f6");

            textBox1.Text = strB;
            textBox2.Text = strL;
            textBox3.Text = H.ToString("f4");
        }