?? tp2ma.m
字號:
function oe=tp2ma(oe,epoch,mu)
%TP2MA Time of periapsis passage to mean anomaly at epoch.
% OE_M = TP2MA(OE_T,EPOCH[,MU]) converts the osculating orbital elements
% OE_T (Nx6) into the osculating orbital elements OE_M (Nx6), where:
%
% OE_T = [a e i W w tp]
% OE_M = [a e i W w M]
%
% where
%
% tp [s] : timepoint of periapsis passage
% M [deg] : mean anomaly at EPOCH [YMDhms]
%
% I.e. tp -> M at EPOCH.
% M = M rem 360.
%
% If MU = G*M is omitted, the central mass M is assumed to be the mass of
% Earth.
%
% See also MA2TP, ORB2CART, DATENUM, STDEPOCH.
% Copyright (c) 2003-04-17, B. Rasmus Anthin.
% Revision 2003-06-09.
r2d=180/pi;
d2r=pi/180;
if nargin<3, mu=constant('G')*constant('Me');end
te=datenum(epoch(:,1),epoch(:,2),epoch(:,3),epoch(:,4),epoch(:,5),epoch(:,6))*24*3600;
a=oe(:,1);
tp=oe(:,6);
n=sqrt(mu./a.^3);
M=n.*(te-tp);
oe(:,6)=unwrap(rem(M,2*pi))*r2d;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -