您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > GPS单点定位实验报告
1GPS原理与应用实验题目:GPS单点定位专业:测绘工程班级:12-01学号:2012212600姓名:王威指导教师:陶庭叶时间:2014.112目录一、实验目的......................................................3二、实验原理………..........................................3三、实验内容……..............................................3四、实验效果图..................................................9五、实验总结......................................................93一.实验目的1.深入了解单点定位的计算过程;2.加强单点定位基本公式和误差方程式,法线方程式的记忆;3.通过上机调试程序加强动手能力的培养。二.实验原理一个接收机接受三个火三个以上卫星信号,得出卫星坐标和伪距,利用间接平差计算接收机的坐标。三.实验内容1.程序流程图2、实验数据列出伪距观测方程伪距方程线性化得出各个坐标的l,m,n组成误差方程组AiX+Li=Vi间接平差得出新的接收机坐标X,Y,Z输入原始数据循环多次精度评定打印输出43、实验程序代码PrivateSubCommand1_Click()CommonDialog1.Filter=TXTfiles|*.txt|CommonDialog1.FilterIndex=1CommonDialog1.ShowOpenOpenMe.CommonDialog1.FileNameForInputAs#1DoWhileNotEOF(1)LineInput#1,Texttextbuff=textbuff+Text+vbCrLfLoopClose#1kk=MSFlexGrid1.Rows-1DimaReDima(kk-1)a=Split(textbuff,vbCrLf)Forj=1TokkFori=1To5MSFlexGrid1.TextMatrix(j,i)=a(j-1+5*(i-1))NextiNextjFork=1TokkMSFlexGrid1.TextMatrix(k,0)=第&k&个点NextkMSFlexGrid1.TextMatrix(0,1)=XMSFlexGrid1.TextMatrix(0,2)=YMSFlexGrid1.TextMatrix(0,3)=ZMSFlexGrid1.TextMatrix(0,4)=伪距MSFlexGrid1.TextMatrix(0,5)=钟差EndSub5PrivateSubCommand2_Click()kk=MSFlexGrid1.Rows-1X0=0:Y0=0:Z0=0c=299792458Dima()ReDima(kk-1,3)Dimll()ReDimll(kk-1,0)Forii=1To100Fori=1Tokkl=(MSFlexGrid1.TextMatrix(i,1)-X0)/Sqr((MSFlexGrid1.TextMatrix(i,1)-X0)^2+(MSFlexGrid1.TextMatrix(i,2)-Y0)^2+(MSFlexGrid1.TextMatrix(i,3)-Z0)^2)m=(MSFlexGrid1.TextMatrix(i,2)-Y0)/Sqr((MSFlexGrid1.TextMatrix(i,1)-X0)^2+(MSFlexGrid1.TextMatrix(i,2)-Y0)^2+(MSFlexGrid1.TextMatrix(i,3)-Z0)^2)n=(MSFlexGrid1.TextMatrix(i,3)-Z0)/Sqr((MSFlexGrid1.TextMatrix(i,1)-X0)^2+(MSFlexGrid1.TextMatrix(i,2)-Y0)^2+(MSFlexGrid1.TextMatrix(i,3)-Z0)^2)a(i-1,0)=la(i-1,1)=ma(i-1,2)=na(i-1,3)=-1lk=MSFlexGrid1.TextMatrix(i,4)-Sqr((MSFlexGrid1.TextMatrix(i,1)-X0)^2+(MSFlexGrid1.TextMatrix(i,2)-Y0)^2+(MSFlexGrid1.TextMatrix(i,3)-Z0)^2)+c*MSFlexGrid1.TextMatrix(i,5)ll(i-1,0)=lkNextigzs=xc(qiuni(xc(zz(a),a)),xc(zz(a),ll))X0=X0-gzs(0,0)Y0=Y0-gzs(1,0)Z0=Z0-gzs(2,0)j=j+1NextiiText2.Text=X=&X0&vbCrLf&vbCrLf&Y=&Y0&vbCrLf&vbCrLf&Z=&Z0V=jian(ll,xc(a,gzs))zjl=xc(zz(V),V)σ0=Sqr(zjl(0,0))/(kk-3)Qx=qiuni(xc(zz(a),a))Text3.Text=σX=&σ0*Sqr(Qx(0,0))&vbCrLf&vbCrLf&σY=&σ0*Sqr(Qx(1,1))&vbCrLf&vbCrLf&σZ=&σ0*Sqr(Qx(2,2))EndSub6PrivateSubForm_Load()MSFlexGrid1.ColWidth(1)=1300MSFlexGrid1.ColWidth(2)=1300MSFlexGrid1.ColWidth(3)=1300MSFlexGrid1.ColWidth(4)=1300Text2.Text=Text3.Text=EndSub'矩阵相减PublicFunctionjian(m,n)Dimi,jAsIntegerIfUBound(m,1)UBound(n,1)OrUBound(m,2)UBound(n,2)ThenMsgBox(请确认输入数组是否可以相减!)ElseDimc()ReDimc(UBound(m,1),UBound(n,2))Fori=0ToUBound(c,1)Forj=0ToUBound(c,2)c(i,j)=m(i,j)-n(i,j)NextjNextijian=cEndIfEndFunction'矩阵的转置PublicFunctionzz(a)DimiAsInteger,jAsInteger,tAsInteger,b()IfUBound(a,1)=UBound(a,2)ThenFori=0ToUBound(a,1)Forj=0ToUBound(a,2)IfijThent=a(i,j)a(i,j)=a(j,i)a(j,i)=tEndIfNextjNextizz=aElseReDimb(UBound(a,2),UBound(a,1))Fori=0ToUBound(a,2)Forj=0ToUBound(a,1)b(i,j)=a(j,i)Nextj7Nextizz=bEndIfEndFunction'两矩阵相乘PublicFunctionxc(a,b)DimiAsInteger,jAsInteger,kAsIntegerIfUBound(a,2)UBound(b,1)ThenMsgBox(这两个矩阵不能够相乘)ExitFunctionEndIfReDimsd(UBound(a,1),UBound(b,2))Fori=0ToUBound(a,1)Forj=0ToUBound(b,2)Fork=0ToUBound(b,1)sd(i,j)=sd(i,j)+a(i,k)*b(k,j)NextkNextjNextixc=sdEndFunctionPublicFunctionqiuni(a)Dimc,m%,n%,p#,l%,i%,j%,ab#m=UBound(a,1)n=UBound(a,2)IfmnThenMsgBox(该矩阵不可逆!!!)ExitFunctionEndIfReDimc(m,2*n+1)Fori=0TomForj=0Tonc(i,j)=a(i,j)NextjNextiFori=0TomForj=m+1To2*m+1c(i,j)=0NextjNextii=0Forj=m+1To2*m+1c(i,j)=1i=i+18NextjFork=0TonIfc(k,k)=0ThenFori=k+1TonIfc(i,k)0ThenGoTothisEndIfNextiIfi=n+1ThenMsgBox(该矩阵不可逆!!!)ExitFunctionEndIfthis:Forj=0To2*m+1p=c(k,j)c(k,j)=c(i,j)c(i,j)=pNextjEndIfab=1#/c(k,k)Forj=0To2*m+1c(k,j)=c(k,j)*abNextjFori=0TonIfikThenForj=0To2*m+1IfjkThenc(i,j)=c(i,j)-c(i,k)*c(k,j)EndIfNextjc(i,k)=0EndIfNextiNextkFori=0TomForj=0Toma(i,j)=c(i,j+n+1)a(i,j)=Round(a(i,j),4)NextjNextiqiuni=aEndFunction9四.实验结果图五.实验总结此次实验让我深入了解单点定位的计算过程,加强了对单点定位基本公式和误差方程式,法线方程式的记忆。并通过上机调试程序加强了自己动手能力的培养。通过此次实验为以后的GPS的学习打下了基础。
本文标题:GPS单点定位实验报告
链接地址:https://www.777doc.com/doc-5709735 .html