ImageVerifierCode 换一换
格式:DOC , 页数:11 ,大小:126KB ,
资源ID:2524839      下载积分:15 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.docduoduo.com/d-2524839.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(高斯正反算实验报告(王震阳20094176).doc)为本站会员(dzzj200808)主动上传,道客多多仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知道客多多(发送邮件至docduoduo@163.com或直接QQ联系客服),我们立即给予删除!

高斯正反算实验报告(王震阳20094176).doc

1、计算机图形学实验报告实验 2:高斯正反算以及换带程序的实现姓 名: 王震阳 学 号: 20094176 班 级: 测绘 09-1 班 指导老师: 周志易 完成时间: 2011.08.1 计算机图形学实验报告1 实验目的和要求1 了解高斯正反算的基本思想。2 完成高斯正反算点算程序的实现过程。2 实验环境和工具通过 Windows xp 系统运行 Vc 6.0 软件。3 实验结果计算机图形学实验报告计算机图形学实验报告计算机图形学实验报告3.1 程序代码1正反算程序char cb100,cl100,cl0100,cx100,cy100;char cbdu100,cbfen100,cbmiao10

2、0;char cldu100,clfen100,clmiao100;char cl0du100,cl0fen100,cl0miao100;double db=0,dl=0,dl0=0,dx=0,dy=0;double dbdu=0,dbfen=0,dbmiao=0;double dldu=0,dlfen=0,dlmiao=0;double dl0du=0,dl0fen=0,dl0miao=0;double p2=206264.8062;char cfr100;char cfb100,cfl100;double dfb=0,dfl=0;double dfbdu=0,dfbfen=0,dfbmia

3、o=0;double dfldu=0,dflfen=0,dflmiao;char cfbdu100,cfbfen100,cfbmiao100;char cfldu100,cflfen100,cflmiao100;m_b.GetWindowText(cb,100);for(int i=0;cbi!= ;i+)if(cbi!= )cbdui=cbi;cbdui=0;dbdu=atof(LPCTSTR)cbdu);/for(int j=0;cbj+strlen(cbdu)+1!= ;j+)cbfenj=cbj+strlen(cbdu)+1;cbfenj=0;dbfen=atof(LPCTSTR)cb

4、fen);/for(int k=0;cbk+strlen(cbdu)+strlen(cbfen)+2!= ;k+)cbmiaok=cbk+strlen(cbdu)+strlen(cbfen)+2;计算机图形学实验报告cbmiaok=0;dbmiao=atof(LPCTSTR)cbmiao);/db=(dbdu*3600+dbfen*60+dbmiao)/206264.8062;/纬度的弧度制/获取经度 L 的度分秒、 、 、 、/m_l.GetWindowText(cl,100);for( i=0;cli!= ;i+)if(cli!= )cldui=cli;cldui=0;dldu=atof(

5、LPCTSTR)cldu);/for( j=0;clj+strlen(cldu)+1!= ;j+)clfenj=clj+strlen(cldu)+1;clfenj=0;dlfen=atof(LPCTSTR)clfen);/for( k=0;clk+strlen(cldu)+strlen(clfen)+2!= ;k+)clmiaok=clk+strlen(cldu)+strlen(clfen)+2;clmiaok=0;dlmiao=atof(LPCTSTR)clmiao);/dl=(dldu*3600+dlfen*60+dlmiao)/206264.8062;/经度的弧度制/获取经度 L0 的度

6、分秒、 、 、 、/m_l0.GetWindowText(cl0,100);double dl1=atof(LPCTSTR)cl0);/dl0=dl1*3600/206264.8062;/中央子午线的弧度制/char czx100,czy100,czr100;double dzx=0.,dzy=0.,dzr=0.;double l=dl-dl0;double n=6399698.902-(21562.267-(108.973-0.612*cos(db)*cos(db)*cos(db)*cos(db)*cos(db)*cos(db);计算机图形学实验报告double a0=32140.404-(

7、135.3302-(0.7092-0.0040*cos(db)*cos(db)*cos(db)*cos(db)*cos(db)*cos(db);double a4=(0.25+0.00252*cos(db)*cos(db)*cos(db)*cos(db)-0.04166;double a6=(0.166*cos(db)*cos(db)-0.084)*cos(db)*cos(db);double a3=(0.3333333+0.001123*cos(db)*cos(db)*cos(db)*cos(db)-0.1666667;double a5=0.0083-(0.1667-(0.1968+0.0

8、04*cos(db)*cos(db)*cos(db)*cos(db)*cos(db)*cos(db);dzx=6367558.4969*db-(a0-(0.5+(a4+a6*l*l)*l*l)*l*l*n)*sin(db)*cos(db);dzy=(1.+(a3+a5*l*l)*l*l)*l*n*cos(db);_gcvt(dzx,14,czx);m_zx=czx;_gcvt(dzy,14,czy);m_zy=czy;/double zr1=0.33333+0.00674*cos(db)*cos(db);double zr2=(0.2*cos(db)*cos(db)-0.0067)*l*l;d

9、ouble dzrdu,dzrfen,dzrmiao;char czrdu100,czrfen100,czrmiao100,mczr1100;CString mczr2,mczr3,mczr4,mczr5,mczr6,mczr7,mczr8;dzr=l*sin(db)*(1+(zr1+zr2)*l*l*cos(db)*cos(db);dzrdu=(int)(dzr*p2/3600.0);dzrfen=(int)(dzr*p2-dzrdu*3600)/60.0);dzrmiao=(dzr*p2-dzrdu*3600-dzrfen*60);_gcvt(dzrdu,5,czrdu);_gcvt(dz

10、rfen,5,czrfen);_gcvt(dzrmiao,4,czrmiao);mczr6= ;mczr2=czrfen;mczr3=czrdu;mczr4=czrmiao;mczr5=mczr3+mczr6+mczr2+mczr6+mczr4;m_zr=mczr5;/反算程序/CString cfdu1,cffen1,cfmiao1,cff1;CString cfdu2,cffen2,cfmiao2,cff2;CString mcfr4,mcfr2,mcfr3,mcfr5,mcfr6;m_x.GetWindowText(cx,100);m_y.GetWindowText(cy,100);dx

11、=atof(LPCTSTR)cx);dy=atof(LPCTSTR)cy);double bter=dx/6367558.4969;double bf1=(293622+(2350+22*cos(bter)*cos(bter)*cos(bter)*cos(bter)*cos(bter)*cos(bter);double bf=bter+(50221746.0+bf1)*sin(bter)*cos(bter)/(10.0*10.0*10.0*10.0*10.0*10.0*10.0*10.0*10.0*计算机图形学实验报告10.0);double nf1=21562.267-(108.973-0.

12、612*cos(bf)*cos(bf)*cos(bf)*cos(bf);double nf=6399698.902-nf1*cos(bf)*cos(bf);double z=dy/(nf*cos(bf);double b2=(0.5+0.003369*cos(bf)*cos(bf)*sin(bf)*cos(bf);double b3=0.333333-(0.166667-0.001123*cos(bf)*cos(bf)*cos(bf)*cos(bf);double b4=0.25+(0.16161+0.00562*cos(bf)*cos(bf)*cos(bf)*cos(bf);double b

13、5=0.2-(0.1667-0.0088*cos(bf)*cos(bf)*cos(bf)*cos(bf);dfb=bf-(1-(b4-0.12*z*z)*z*z)*z*z*b2;dfl=dl0+(1-(b3-b5*z*z)*z*z)*z;dfbdu=(int)(dfb*p2/3600);dfbfen=(int)(dfb*p2-dfbdu*3600)/60);dfbmiao=dfb*p2-dfbdu*3600-dfbfen*60;_gcvt(dfbdu,15,cfbdu);cfdu1=cfbdu;_gcvt(dfbfen,15,cfbfen);cffen1=cfbfen;_gcvt(dfbmia

14、o,15,cfbmiao);cfmiao1=cfbmiao;cff1=cfdu1+mczr6+cffen1+mczr6+cfmiao1;m_fb=cff1;dfldu=(int)(dfl*p2/3600);dflfen=(int)(dfl*p2-dfldu*3600)/60);dflmiao=dfl*p2-dfldu*3600-dflfen*60;_gcvt(dfldu,10,cfldu);cfdu2=cfldu;_gcvt(dflfen,10,cflfen);cffen2=cflfen;_gcvt(dflmiao,10,cflmiao);cfmiao2=cflmiao;cff2=cfdu2+

15、mczr6+cffen2+mczr6+cfmiao2;m_fl=cff2;/计算反算子午收敛角 du/double dfr;double l1=dl0-dfl;double fr1=0.33333+0.00674*cos(dfb)*cos(dfb);double fr2=(0.2*cos(dfb)*cos(dfb)-0.0067)*l1*l1;double dfrdu,dfrfen,dfrmiao;char cfrdu100,cfrfen100,cfrmiao100,mcfr1100;dfr=l1*sin(dfb)*(1+(fr1+fr2)*l1*l1*cos(dfb)*cos(dfb);df

16、rdu=(int)(dfr*p2/3600.0);计算机图形学实验报告dfrfen=(int)(dfr*p2-dfrdu*3600)/60.0);dfrmiao=(dfr*p2-dfrdu*3600-dfrfen*60);_gcvt(dfrdu,5,cfrdu);_gcvt(dfrfen,5,cfrfen);_gcvt(dfrmiao,4,cfrmiao);mcfr6= ;mcfr2=czrfen;mcfr3=czrdu;mcfr4=czrmiao;mcfr5=mcfr3+mcfr6+mcfr2+mcfr6+mcfr4;m_fr=mcfr5;UpdateData(false);/换带程序cha

17、r cx100,cy100;char cl0100;char cl0n100;double dx=0.,dy=0.;double dl0=0.,dl0n=0.;m_x1.GetWindowText(cx,100);m_y1.GetWindowText(cy,100);dx=atof(LPCTSTR)cx);dy=atof(LPCTSTR)cy);m_l0.GetWindowText(cl0,100);dl0=atof(LPCTSTR)cl0);m_l0n.GetWindowText(cl0n,100);dl0n=atof(LPCTSTR)cl0n);double bter=dx/6367558

18、.4969;double bf1=(293622+(2350+22*cos(bter)*cos(bter)*cos(bter)*cos(bter)*cos(bter)*cos(bter);double bf=bter+(50221746.0+bf1)*sin(bter)*cos(bter)/(10.0*10.0*10.0*10.0*10.0*10.0*10.0*10.0*10.0*10.0);double nf1=21562.267-(108.973-0.612*cos(bf)*cos(bf)*cos(bf)*cos(bf);double nf=6399698.902-nf1*cos(bf)*

19、cos(bf);double z=dy/(nf*cos(bf);double b2=(0.5+0.003369*cos(bf)*cos(bf)*sin(bf)*cos(bf);double b3=0.333333-(0.166667-0.001123*cos(bf)*cos(bf)*cos(bf)*cos(bf);double b4=0.25+(0.16161+0.00562*cos(bf)*cos(bf)*cos(bf)*cos(bf);double b5=0.2-(0.1667-0.0088*cos(bf)*cos(bf)*cos(bf)*cos(bf);double dfb=0,dfl=

20、0.;dfb=bf-(1-(b4-0.12*z*z)*z*z)*z*z*b2;CString cfdu1,cffen1,cfmiao1,cff1;CString mczr6= ;double dfbdu=(int)(dfb*p2/3600);double dfbfen=(int)(dfb*p2-dfbdu*3600)/60);计算机图形学实验报告double dfbmiao=dfb*p2-dfbdu*3600-dfbfen*60;char cfbdu100,cfbfen100,cfbmiao100;_gcvt(dfbdu,15,cfbdu);cfdu1=cfbdu;_gcvt(dfbfen,1

21、5,cfbfen);cffen1=cfbfen;_gcvt(dfbmiao,15,cfbmiao);cfmiao1=cfbmiao;cff1=cfdu1+mczr6+cffen1+mczr6+cfmiao1;m_b=cff1;/dl0=dl0*3600/206264.8062;dfl=dl0+(1-(b3-b5*z*z)*z*z)*z;double dfldu=(int)(dfl*p2/3600);double dflfen=(int)(dfl*p2-dfldu*3600)/60);double dflmiao=dfl*p2-dfldu*3600-dflfen*60;char cfldu100

22、,cflfen100,cflmiao100;CString cfdu2,cffen2,cfmiao2,cff2;_gcvt(dfldu,100,cfldu);cfdu2=cfldu;_gcvt(dflfen,100,cflfen);cffen2=cflfen;_gcvt(dflmiao,100,cflmiao);cfmiao2=cflmiao;cff2=cfdu2+mczr6+cffen2+mczr6+cfmiao2;m_l=cff2;/UpdateData(false);double l=dfl-dl0n*3600/p2;double n=6399698.902-(21562.267-(10

23、8.973-0.612*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb);double a0=32140.404-(135.3302-(0.7092-0.0040*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb);double a4=(0.25+0.00252*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)-0.04166;double a6=(0.166*cos(dfb)*cos(dfb)-0.084)*cos(dfb)*cos(dfb);double

24、a3=(0.3333333+0.001123*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)-0.1666667;double a5=0.0083-(0.1667-(0.1968+0.004*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)*cos(dfb)char cx2100;char cy2100;double dx2=6367558.4969*dfb-(a0-(0.5+(a4+a6*l*l)*l*l)*l*l*n)*sin(dfb)*cos(dfb);double dy2=(1.+(a3+a5*l*l)*l*l)*l*n*

25、cos(dfb);_gcvt(dx2,14,cx2);m_x2=cx2;_gcvt(dy2,14,cy2);m_y2=cy2;UpdateData(false);计算机图形学实验报告/double zr1=0.33333+0.00674*cos(dfb)*cos(dfb);double zr2=(0.2*cos(dfb)*cos(dfb)-0.0067)*l*l;double dzrdu,dzrfen,dzrmiao;char czrdu100,czrfen100,czrmiao100,mczr1100;CString mczr2,mczr3,mczr4,mczr5,mczr7,mczr8;d

26、ouble dzr=l*sin(dfb)*(1+(zr1+zr2)*l*l*cos(dfb)*cos(dfb);dzrdu=(int)(dzr*p2/3600.0);dzrfen=(int)(dzr*p2-dzrdu*3600)/60.0);dzrmiao=(dzr*p2-dzrdu*3600-dzrfen*60);_gcvt(dzrdu,5,czrdu);_gcvt(dzrfen,5,czrfen);_gcvt(dzrmiao,4,czrmiao);mczr6= ;mczr2=czrfen;mczr3=czrdu;mczr4=czrmiao;mczr5=mczr3+mczr6+mczr2+mczr6+mczr4;m_r=mczr5;UpdateData(false);3.2 运行结果分析得到预期结果,经过和答案比对完全正确,程序正确。4 实验心得本次程序和上一次大地主题结算程序相比有一点改进之处,在输入度分秒时可以在同一个编辑框里同时输入,之间要以空格分开,程序便可识别。

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报