欢迎来到天天文库
浏览记录
ID:35427858
大小:65.49 KB
页数:6页
时间:2019-03-24
《编程作业2高斯正反算》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、编程作业2髙斯止反算测绘5班唐威2011301610203一、主要代码voidCGKProjectionDlg::OnPaint(){if(IsIconicO){CPaintDCdc(this);//devicecontextforpaintingSendMessage(WM_ICONERASEBKGND,(WPARAM)dc.GetSafeHdc(),0);//Centericoninclientrectangleintcxlcon=GetSystemMetrics(SM_CXICON);intcylcon=GetSystemMetricsCSM^CYICON);CRectrect;Get
2、ClientRect(&「ect);intx=(rect.Width()-cxlcon+1)/2;inty=(rect.Height()・cylcon+1)/2;//Drawtheicondc.DrawIcon(x,y,m_hlcon);}else{CDialog::OnPaint();doubleCGKProjectionDlg::DMS2RAD(doubledms){doubledeg,min,sec,RAD;if(dms<0)dms+=180;deg=int(dms);min=int((dms-deg)*100);sec=((dms-deg)*100-min)*100;RAD=(deg
3、+min/60+sec/3600)*PI/180;return(RAD);doubleCGKProjectionDlg::RAD2DMS(doubleR){doubledeg,min,Sec,DMS,Deg,Min;if(R<0)R+二PI;deg=R*180/PI;Deg=int(deg+0.00001);min=(deg-Deg)*60;Min=int(min+0.00001);Sec=(min-Min)*60;DMS=(Deg+Min/100+Sec/10000);return(DMS);//Thesystemcallsthistoobtainthecursortodisplaywhi
4、letheuserdrags//theminimizedwindow.HCURSORCGKProjectionDlg::OnQueryDragIcon(){return(HCURSOR)m_hlcon;voidCGKProjectionDlg::OnBj54(){//TODO:Addyourcontrolnotificationhandlercodeherea=6378245;fl=29&3;e2=2/fl-l/(fl*fl);c=a/sqrt(l-e2);}voidCGKProjectionDlg::OnXian80(){//TODO:Addyourcontrolnotificationh
5、andlercodeherea=6378140;fl=298.257;e2=2/fl-l/(fl*fl);c=a/sqrt(l-e2);voidCGKProjectionDlg::OnCgcs2000()//TODO:Addyourcontrolnotificationhandlercodeherea=6378137;fl=298.257222101;e2=2/fl-l/(fl*fl);c=a/sqrt(l-e2);voidCGKProjectionDlg::OnWgs84(){//TODO:Addyourcontrolnotificationhandlercodeherea=6378137
6、;fl=298.257223563;e2=2/fl-l/(fl*fl);c=a/sqrt(l-e2);voidCGKProjectionDlg::OnWrs80(){//TODO:Addyourcontrolnotificationhandlercodeherea=6378137;fl=298.257222101;e2=2/fl-l/(fl*fl);c=a/sqrt(l-e2);voidCGKProjectionDlg::OnDirect(){//TODO:AddyourcontrolnotificationhandlercodehereUpdateData(true);doublem[5]
7、,A[5],t,g,X,N;inti;L=m_l;n=int(L/6)+1;L0=6*n-3;L0=DMS2RAD(L0);L=DMS2RAD(L);1=L-L0;B=m_b;B=DMS2RAD(B);//I=DMS2RAD(I);t=tan(B);g=e2*cos(B)*cos(B);//V=sqrt(l+g);//N=c/V;N=a/(sqrt(l-e2*sin(B)*sin(B)));m[0]=a*(l
此文档下载收益归作者所有