高斯投影正反算c代码

高斯投影正反算c代码

ID:47320649

大小:126.00 KB

页数:11页

时间:2019-08-16

高斯投影正反算c代码_第1页
高斯投影正反算c代码_第2页
高斯投影正反算c代码_第3页
高斯投影正反算c代码_第4页
高斯投影正反算c代码_第5页
资源描述:

《高斯投影正反算c代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、高斯投影正反算程序设计一.程序设计流程本程序的设计思路如下:(1),程序采用VS08版本作为开发平台,并采用C#语言作为开发语言,设计为WindowsForm窗体程序形式。(2),程序主要的算法来自于教材。但是本程序为了更加实用,添加了更多的解算基准,包括:WGS-84,国际椭球1975,克氏椭球,和2000国家大地坐标系。(3),程序为了更方便的读取数据和输出数据,故需要自己定义了固定的数据输入格式和数据输出格式或形式,请老师注意查看。二.代码usingSystem;usingSystem.Col

2、lections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespaceGauss{publicpartialclassForm1:Form{//大地坐标//GeodeticCoordinatepublicstructCRDGEODETIC{publicdoubledLongitude;publicdoubl

3、edLatitude;publicdoubledHeight;}//笛卡尔坐标//CartesianCoordinatepublicstructCRDCARTESIAN{publicdoublex;publicdoubley;publicdoublez;}publicForm1(){InitializeComponent();}privatevoidbutton1_Click(objectsender,EventArgse){doubleee=0;doublea=0;stringtt;try{tt=

4、this.comboBox1.Items[this.comboBox1.SelectedIndex].ToString();}catch{MessageBox.Show("GaussInverse:Choosedatumerror!");return;}if(tt.CompareTo("克氏椭球")==0){a=6378245.00;ee=Math.Sqrt(0.006693421622);}if(tt.CompareTo("WGS-84")==0){a=6378137.00;ee=Math.Sqr

5、t(0.00669437999013);}if(tt.CompareTo("1975国际椭球")==0){a=6378140.00;ee=Math.Sqrt(0.006694384999588);}if(tt.CompareTo("2000国家大地坐标系")==0){a=6378137.0;ee=Math.Sqrt(0.0066943802290);}constdoublepai=3.1415926;doubleb=Math.Sqrt(a*a*(1-ee*ee));doublec=a*a/b;dou

6、bleepp=Math.Sqrt((a*a-b*b)/b/b);CRDGEODETICpcrdGeo;CRDCARTESIANpcrdCar;doublemidlong;//求纬度string[]temp;temp=textBox1.Text.Split('');double[]tempradius=newdouble[3];for(inti=0;i<3;i++){tempradius[i]=Convert.ToDouble(temp[i]);}pcrdGeo.dLatitude=tempradiu

7、s[0]/180.0*pai+tempradius[1]/180.0/60.0*pai+tempradius[2]/180/60.0/60*pai;//求经度temp=textBox2.Text.Split('');for(inti=0;i<3;i++){tempradius[i]=Convert.ToDouble(temp[i]);}pcrdGeo.dLongitude=tempradius[0]/180.0*pai+tempradius[1]/180.0/60.0*pai+tempradius[

8、2]/180/60.0/60*pai;intdeglon=Convert.ToInt32(pcrdGeo.dLongitude*180/pai);//求中央经度intnum;//带号midlong=0;//默认值,需要制定分带try{tt=this.comboBox3.Items[this.comboBox3.SelectedIndex].ToString();}catch{MessageBox.Show("Choose3/6error!");return;}if(t

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。