表设计器样式usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespace大地主题解算{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}doublee1,c,L1,B1,A1,S,L2,B2;privatevoidbutton1_Click(objectsender,EventArgse){doubled1,f1,m1,dB,dL,dA,M,N,V,dB0,dA0,dL0,Am,Bm,Lm,n2,t2,s1,c1,A21;if(radioButton1.Checked){e1=0.006738525414683;c=6399698.9017827110;}elseif(radioButton2.Checked){e1=0.006739501819473;c=6399596.6519880105;}elseif(radioButton3.Checked){e1=0.00673949674227;c=6399593.6258;}d1=(int)(double.Parse(T1.Text));f1=(int)((double.Parse(T1.Text)-d1)*100);m1=(int)(((double.Parse(T1.Text)-d1)*100-f1)*100);B1=(d1*3600+f1*60+m1);d1=(int)(double.Parse(T2.Text));f1=(int)((double.Parse(T2.Text)-d1)*100);m1=(int)(((double.Parse(T2.Text)-d1)*100-f1)*100);L1=(d1*3600+f1*60+m1);d1=(int)(double.Parse(T3.Text));f1=(int)((double.Parse(T3.Text)-d1)*100);m1=(int)(((double.Parse(T3.Text)-d1)*100-f1)*100);A1=(d1*3600+f1*60+m1);V=Math.Sqrt(1+e1*Math.Pow(Math.Cos(B1/206265),2));S=double.Parse(T4.Text);N=c/V;M=c/Math.Pow(V,3);t2=Math.Tan(B1/206265)*Math.Tan(B1/206265);n2=e1*Math.Pow(Math.Cos(B1/206265),2);dB0=206265/M*S*Math.Cos(A1/206265);dL0=20265/N*S*Math.Sin(A1/206265)/Math.Cos(B1/206265);dA0=dL0*Math.Sin(B1/206265);Bm=B1+1/2*dB0;Lm=L1+1/2*dL0;Am=A1+1/2*dA0;s1=Math.Sin(Am/206265);c1=Math.Cos(Am/206265);dB=V*V/N*206265*S*c1*(1+S*S/24/N/N*(s1*s1*(2+3*t2+2*n2)+3*n2*c1*c1*(t2-1-n2-4*t2)*n2));dL=206265/N*S/Math.Cos(B1)*s1*(1+S*S/24/N/N*(s1*s1*t2-c1*c1*(1+n2-9*t2*n2)));dA=206265/N*S*s1*Math.Tan(B1)*(1+S*S/24/N/N*(c1*c1*(2+7*n2+9*t2*n2+5*n2*n2)+s1*s1*(2+t2+2*n2)));while((Math.Abs(dB-dB0)Math.Pow(10,-6))&&(Math.Abs(dL-dL0)Math.Pow(10,-6))&&(Math.Abs(dA-dA0)Math.Pow(10,-6))){Bm=B1+1/2*dB;Am=A1+1/2*dA;Lm=L1+1/2*dL;dB=V*V/N*206265*S*c1*(1+S*S/24/N/N*(s1*s1*(2+3*t2+2*n2)+3*n2*c1*c1*(t2-1-n2-4*t2)*n2));dL=206265/N*S/Math.Cos(B1)*s1*(1+S*S/24/N/N*(s1*s1*t2-c1*c1*(1+n2-9*t2*n2)));dA=206265/N*S*s1*Math.Tan(B1)*(1+S*S/24/N/N*(c1*c1*(2+7*n2+9*t2*n2+5*n2*n2)+s1*s1*(2+t2+2*n2)));}B2=B1+dB;L2=L1+dL;A21=0;if(A1180*3600&&A1=360*3600){A21=A1-180*3600+dA;}elseif(A1180*3600&&A1=0){A21=A1+180*3600+dA;}d1=(int)(B2/3600);f1=(int)((B2-d1*3600)/60);m1=Math.Round((B2-d1*3600-f1*60),4);T9.Text=d1+:+f1+:+m1;d1=(int)(L2/3600);f1=(int)((L2-d1*3600)/60);m1=Math.Round((L2-d1*3600-f1*60),4);T10.Text=d1+:+f1+:+m1;d1=(int)(A21/3600);f1=(int)((A21-d1*3600)/60);m1=Math.Round((A21-d1*3600-f1*60),4);T11.Text=d1+:+f1+:+m1;}privatevoidbutton2_Click(objectsender,EventArgse){doubleu,v,C,V,dAm,Am,Bm,T,d1,c1,m1,dA,f1,A12,A21,r01,r21,r03,t,S10,S12,S30,N,n2,t2,dL,dB,S,t01,t21,t03;if(radioButton1.Checked){e1=0.006738525414683;c=6399698.9017827110;}elseif(radioButton2.Checked){e1=0.006739501819473;c=6399596.6519880105;}elseif(radioButton3.Checked){e1=0.00673949674227;c=6399593.6258;}d1=(int)(double.Parse(T5.Text));f1=(int)((double.Parse(T5.Text)-d1)*100);m1=(int)(((double.Parse(T5.Text)-d1)*100-f1)*100);B1=(d1*3600+f1*60+m1);d1=(int)(double.Parse(T6.Text));f1=(int)((double.Parse(T6.Text)-d1)*100);m1=(int)(((double.Parse(T6.Text)-d1)*100-f1)*100);L1=(d1*3600+f1*60+m1);d1=(int)(double.Parse(T7.Text));f1=(int)((double.Parse(T7.Text)-d1)*100);m1=(int)(((double.Parse(T7.Text)-d1)*100-f1)*100);B2=(d1*3600+f1*60+m1);d1=(int)(double.Parse(T8.Text));f1=(int)((double.Parse(T8.Text)-d1)*100);m1=(int)(((double.Parse(T8.Text)-d1)*100-f1)*100);L2=(d1*3600+f1*60+m1);Bm=(B1+B2)/2;V=Math.Sqrt(1+e1*Math.Pow(Math.Cos(Bm/206265),2));N=c/V;n2=e1*Math.Pow(Math.Cos(Bm/206265),2);t2=Math.Tan(Bm)*Math.Tan(Bm/206265);c1=Math.Cos(Bm/206265);r01=N/206265*Math.Cos(Bm/206265);r21=N*c1/24/Math.Pow(206265,3)*(1-n2-9*n2*t2);r03=N/24/Math.Pow(206265,3)*Math.Pow(c1,3)*t2;S10=N/206265/V/V;S12=N/24/Math.Pow(206265,3)*c1*c1*(3*t2*n2-2-3*t2);S30=N/8/Math.Pow(206265,3)*(n2-t2*n2);t=Math.Tan(Bm);c1=Math.Cos(Bm);t01=t*c1;t21=1/24/206265/206265*c1*t*(3+2*n2-2*n2*n2);t03=1/12/Math.Pow(206265,2)*c1*c1*c1*t*(1+n2);dL=L2-L1;dB=B2-B1;u=r01*dL+r21*dB*dB*dL+r03*Math.Pow(dL,3);v=S10*dB+S12*dL*dB*dL+S30*Math.Pow(dB,3);dA=(t01*dL+t21*dB*dB*dL+t03*Math.Pow(dL,3))/206265;dAm=Math.Atan(u/v);T=0;Am=0;C=v/u;if(Math.Abs(dB)=Math.Abs(dL))T=Math.Atan(u/v);elseT=Math.PI/4+Math.Atan(Math.Abs((1-C)/(1+C)));if(dB0&&dL=0)Am=T;elseif(dB0&&dL=0)Am=Math.PI-T;elseif(dB=0&&dL0)Am=Math.PI+T;elseif(dB0&&dL0)Am=2*Math.PI-T;elseif(dB==0&&dL0)Am=Math.PI/2;S=u/Math.Sin(Am);S=Math.Round(S,4);A12=Am-1/2*dA;if(A12=180*3600)A21=Am+1/2*dA+Math.PI;elseA21=Am+1/2*dA-Math.PI;A12=A12*206265;A21=A21*206265;d1=(int)(A12/3600);f1=(int)((A12-d1*3600)/60);m1=Math.Round((A12-d1*3600-f1*60),4);T13.Text=d1+:+f1+:+m1;d1=(int)(A21/3600);f1=(int)((A21-d1*3600)/60);m1=Math.Round((A21-d1*3600-f1*60),4);T14.Text=d1+:+f1+:+m1;T12.Text=S.ToString();}}}