卫星星历
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
两行式轨道数据是美国的北美防空联合司令部(North American Aerospace Defense Command,NORAD)创立的用于描述卫星位置和速度的表达式。
具体格式为:
Data for each satellite consists of three lines in the following format: AAAAAAAAAAAAAAAAAAAAAAAA
1 NNNNNU NNNNNAAA NNNNN.NNNNNNNN +.NNNNNNNN +NNNNN-N +NNNNN-N N NNNNN
2 NNNNN NNN.NNNN NNN.NNNN NNNNNNN NNN.NNNN NNN.NNNN NN.NNNNNNNNNNNNNN
% M is the mean anomaly at epoch
% E is the eccentric anomaly at epoch
% satname is the satellite name
%
% Calls Newton iteration function file EofMe.m
function [oe,epoch,yr,M,E,satname] = TLE2oe(file1.txt);
% Open the file up and scan in the elements
fid = fopen(fname, 'r');
A = fscanf(fid,'%13c%*s',1);
B = fscanf(fid,'%d%6d%*c%5d%*3c%2d%f%f%5d%*c%*d%5d%*c%*d%d%5d',[1,10]);
C = fscanf(fid,'%d%6d%f%f%f%f%f%f',[1,8]);
fclose(fid);
satname=A;
% The value of mu is for the earth
mu = 3.986004415e5;
% Calculate 2-digit year (Oh no!, look out for Y2K bug!)
yr = B(1,4);
% Calculate epoch in julian days
epoch = B(1,5);
%ndot = B(1,6);
% n2dot = B(1,7);
% Assign variables to the orbital elements
i = C(1,3)*pi/180; % inclination
Om = C(1,4)*pi/180; % Right Ascension of the Ascending Node e = C(1,5)/1e7; % Eccentricity
om = C(1,6)*pi/180; % Argument of periapsis
M = C(1,7)*pi/180; % Mean anomaly
n = C(1,8)*2*pi/(24*3600); % Mean motion
% Calculate the semi-major axis
a = (mu/n^2)^(1/3);
% Calculate the eccentric anomaly using mean anomaly
E = EofMe(M,e,1e-10);
% Calculate true anomaly from eccentric anomaly
cosnu = (e-cos(E)) / (e*cos(E)-1);
sinnu = ((a*sqrt(1-e*e)) / (a*(1-e*cos(E))))*sin(E);
nu = atan2(sinnu,cosnu);
if (nu<0), nu=nu+2*pi; end
% Return the orbital elements in a 1x6 matrix
oe = [a e i Om om nu];
另外一个需要的程序为:
% this function solves Kepler's equation, % computing E as a function of M and e
%
function E = EofMe(M,e,tol)
if ( nargin<3 ), tol=1e-11; end
En = M;
En1 = En - (En-e*sin(En)-M)/(1-e*cos(En)); while ( abs(En1-En) > tol )
En = En1;
En1 = En - (En-e*sin(En)-M)/(1-e*cos(En)); end;
E = En1;。