西南交通大学《卫星坐标计算实验》实验报告专业:班级:姓名:学号:成绩:2017年3月20日-1-一、实验步骤:1、将星历文件中需要的数据作为矩阵导入MATLAB中的变量。2、编写计算程序代码1)计算平均角速度0n:03GMna2)改正平角速度n:0nnn3)计算平近点角tM:0()teMMntt4)通过迭代计算,计算偏近点角tE:sintttEMeE5)计算真近点角:21sin=atancostteEEe6)计算升交距角0u:0u7)计算卫星轨道摄动项改正数:02cossincossincossinuuCucCusrCrcCrsiCicCis8)计算改正后的真近点角:0tuuu9)计算改正后的向径tr:0trrr10)计算改正后的倾角ti:0()teiiiitt-2-11)计算轨道平面内的坐标:cossin0tttttttxruyruz12)计算观测瞬间升交点的经度tl:0()teeellttt13)计算旋转矩阵:1000cos()sin()0sin()cos()xttttRiiiicos()sin()0sin()cos()0001ttzttllRll14)卫星坐标:tzxttXxYRRyZz15)计算钟差:2012()()eetaattatt二、实现代码:functionpos=SPOS(br,dt)GM=3.986005e+14;we=7.2921151467e-5;%a0a1a2a0=br(1,2);a1=br(1,3);a2=br(1,4);%IODECrsdnM0Crs=br(2,2);dn=br(2,3);M0=br(2,4);%CuceCussqACuc=br(3,1);e=br(3,2);Cus=br(3,3);sqA=br(3,4);%toeCicOM0Cistoe=br(4,1);Cic=br(4,2);OM0=br(4,3);-3-Cis=br(4,4);%i0CrcwDOMi0=br(5,1);Crc=br(5,2);w=br(5,3);DOM=br(5,4);%DiweekDi=br(6,1);n0=sqrt(GM)/sqA^3;n=n0+dn;Mk=M0+n*dt;Ek=Mk;Te=inf;whileabs(Te-Ek)1e-14Te=Ek;Ek=Mk+e*sin(Ek);endxx=cos(Ek)-e;yy=sqrt(1-e*e)*sin(Ek);v=atan2(yy,xx);u=v+w;du=Cuc*cos(2*u)+Cus*sin(2*u);dr=Crc*cos(2*u)+Crs*sin(2*u);di=Cic*cos(2*u)+Cis*sin(2*u);uk=u+du;rk=sqA*sqA*(1-e*cos(Ek))+dr;ik=i0+di+Di*dt;X=[rk*cos(uk);rk*sin(uk);0];Rx=[100;0cos(ik)-sin(ik);0sin(ik)cos(ik)];lt=OM0+(DOM-we)*(toe+dt)-DOM*toe;Rz=[cos(lt)-sin(lt)0;sin(lt)cos(lt)0;001];%计算钟差ddt=a0+a1*(dt-toe)+a2*(dt-toe)^2;disp(ddt);pos=Rz*Rx*X;end-4-三、实验结果: