Code covered by the BSD License
- atan3 (a, b)
four quadrant inverse tangent
- eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
- oeprint1(mu, oev)
print six classical orbital elements
- om_constants
astrodynamic and utility constants
- orb2eci(mu, oev)
convert classical orbital elements to eci state vector
- pvector (ri, vi, x)
primer vector and derivative magnitudes
- pviniz (tof, r1, v1, dv1,...primer vector initialization
- stm2 (mu, tau, ri, vi)
two body state transition matrix
- svprint(r, v)
print position and velocity vectors and magnitudes
- twobody2 (mu, tau, ri, vi)solve the two body initial value problem
- phasing.m
-
View all files
from
Two Impulse Phasing Analysis
by David Eagle
Phasing analysis between two coplanar circular orbits using a two impulse Hohmann transfer.
|
| atan3 (a, b)
|
function y = atan3 (a, b)
% four quadrant inverse tangent
% input
% a = sine of angle
% b = cosine of angle
% output
% y = angle (radians; 0 =< c <= 2 * pi)
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
epsilon = 0.0000000001;
pidiv2 = 0.5 * pi;
if (abs(a) < epsilon)
y = (1 - sign(b)) * pidiv2;
return;
else
c = (2 - sign(a)) * pidiv2;
end
if (abs(b) < epsilon)
y = c;
return;
else
y = c + sign(a) * sign(b) * (abs(atan(a / b)) - pidiv2);
end
|
|
Contact us