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

📄 tp2ma.m

📁 航天工程工具箱
💻 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;

⌨️ 快捷键说明

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