Code covered by the BSD License
-
atan3 (a, b)
four quadrant inverse tangent
-
ceqm1 (t, y)
first order form of Cowell's equations of orbital motion
-
eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
-
eci2orb2 (mu, gst0, omega, ut...
convert eci state vector to complete set of classical orbital elements
-
gast1 (jdate)
Greenwich apparent sidereal time
-
gdate (jdate)
convert Julian date to Gregorian (calendar) date
-
geodet1 (rmag, dec)
geodetic latitude and altitude
-
getdate
interactive request and input of calendar date
-
getoe(ioev)
interactive request of classical orbital elements
-
gettime
interactive request and input of universal time
-
gravity (t, y)
first order equations of orbital motion
-
jd2str(jdate)
convert Julian date to string equivalent
-
julian (month, day, year)
Julian date
-
moon (jdate)
lunar ephemeris
-
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
-
r2r (x)
revolutions to radians function
-
readgm(fname)
read gravity model data file
-
readoe1(filename)
read orbital elements data file
-
rkf78 (deq, neq, ti, tf, h, t...
solve first order system of differential equations
-
sun1 (jdate)
solar ephemeris
-
svprint(r, v)
print position and velocity vectors and magnitudes
-
gto.m
-
View all files
from
The Long-term Evolution of Geosynchronous Transfer Orbits
by David Eagle
Interactive MATLAB script that predicts the long-term evolution of geosynchronous transfer orbits.
|
| 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