📄 etheta2e.m
字号:
function E = etheta2E(e, th)
%ETHETA2E Convert Kepler elements [e] and [theta] to [E].
%
% ETHETA2E(e, theta) converts the Keplerian elements [e] and [theta] to
% their corresponding eccentric anomaly [E]. In case [e] > 1, the value
% for [E] is the hyperbolic anomaly [F].
%
% See also aeM2rtheta, etheta2M.
% Author: Rody P.S. Oldenhuis
% Delft University of Technology
% E-mail: oldenhuis@dds.nl
% Last edited 13/Feb/2009
% initialize E
E = zeros(size(e));
% seperate ellipses from hyperbolas
ell = (e < 1);
hyp = (e > 1);
% output results
if any(ell(:))
E(ell) = 2*atan2(sqrt(1-e(ell)).*sin(th(ell)/2), sqrt(1+e(ell)).*cos(th(ell)/2));
end
if any(hyp(:))
E(hyp) = 2*atanh(sqrt( (e(hyp)-1) ./ (e(hyp)+1) ) .* tan(th(hyp)/2));
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -