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

📄 ee2theta.m

📁 It s verry good for you
💻 M
字号:
function th = eE2theta(e, E)
%EE2THETA               Convert Kepler elements [e] and [E] to [theta].
%
%   EE2THETA(e, E) converts the Keplerian elements [e] and [E] to
%   their corresponding true anomaly [theta]. In case [e] > 1, the value
%   for [E] is taken to be the hyperbolic anomaly [F].
%
%   See also aeM2rtheta, etheta2M, etheta2E.

% Author: Rody P.S. Oldenhuis
% Delft University of Technology
% E-mail: oldenhuis@dds.nl
% Last edited 27/Feb/2009
    
    % initialize theta
    th = zeros(size(e));
    
    % seperate ellipses from hyperbolas
    ell = (e < 1);
    hyp = (e > 1);
    
    % output results    
    if any(ell(:))        
        th(ell) = 2*atan2(sqrt(1+e(ell)).*sin(E(ell)/2), sqrt(1-e(ell)).*cos(E(ell)/2));
    end
    if any(hyp(:))
        th(hyp) = 2*atan2(sqrt(e(hyp)+1).*sinh(E(hyp)/2), sqrt(e(hyp)-1).*cosh(E(hyp)/2));
    end
end

⌨️ 快捷键说明

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