⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ma2tp.m

📁 航天工程工具箱
💻 M
字号:
function oe=ma2tp(oe,epoch,mu)
%MA2TP  Mean anomaly at epoch to time of periapsis passage.
%   OE_T = MA2TP(OE_M,EPOCH,MU]) converts the osculating orbital elements
%   OE_M (Nx6) into the osculating orbital elements OE_T (Nx6), where:
%
%      OE_M = [a e i W w M]
%      OE_T = [a e i W w tp]
%
%   where
%
%      M  [deg] : mean anomaly at EPOCH [YMDhms]
%      tp [s]   : timepoint of periapsis passage (from A.D.)
%
%   I.e. M at EPOCH -> tp.
%   tp = tp rem P.
%
%   If MU = G*M is omitted, the central mass M is assumed to be the mass of
%   Earth.
%
%   See also TP2MA, ORB2CART, DATENUM, DATEVEC, 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);
M=oe(:,6);
n=sqrt(mu./a.^3)*r2d;
P=360./n;
tM=M./n;
tp=te-tM;
oe(:,6)=rem(tp,P);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -