Code covered by the BSD License
-
atan3 (a, b)
four quadrant inverse tangent
-
brent (f, x1, x2, rtol)
solve for a single real root of a nonlinear equation
-
coe2eqoe(coe)
convert classical orbital elements to
-
coe2mee(mu, coe)
convert classical orbital elements to modified equinoctial orbital elements
-
ecf2eci (gast, recf, vecf)
ecf-to-eci transformation
-
eci2ecf (gast, reci, veci)
eci-to-ecf transformation
-
eci2fpc1(gast, reci, veci)
convert inertial state vector to flight path coordinates
-
eci2mee(mu, reci, veci)
convert eci state vector to
-
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
-
eqxra (tjd, k)
this function computes the intermediate right ascension
-
erot (date1, date2)
this function returns the value of the earth rotation angle
-
etilt1 (tjd)
this function computes quantities related to the orientation
-
findleap(jdate)
find number of leap seconds for utc julian date
-
fpc2ecf (fpc)
transform relative flight path coordinates
-
fpc2eci(gst, fpc)
convert relative flight path coordinates to inertial state vector
-
funarg (t)
this function computes fundamental arguments (mean elements)
-
gast2 (tjdh, tjdl, k)
this function computes the greenwich sidereal time
-
gast4 (tjdh, tjdl, k)
this function computes the greenwich sidereal time
-
gdate (jdate)
convert Julian date to Gregorian (calendar) date
-
geodet1 (rmag, dec)
geodetic latitude and altitude
-
geodet4 (lat, alt)
geodetic to geocentric coordinates
-
get_tdb_time
interactive request and input of Barycentric Dynamical Time
-
get_utc_time
interactive request and input of universal coordinated time
-
getdate
interactive request and input of calendar date
-
getoe(ioev)
interactive request of classical orbital elements
-
getsv
interactive request of state vector
-
gettime
interactive request and input of universal time
-
hrs2hms (hrs)
convert decimal hours to hours,
-
jd2str(jdate)
convert Julian date to string equivalent
-
jdfunction (jdin)
objective function for tdb2utc
-
julian (month, day, year)
Julian date
-
kepler1 (manom, ecc)
solve Kepler's equation for circular,
-
lla2eci (gast, lat, long, alt...
convert geodetic altitude, latitude and longitude to eci position vector
-
mee2coe(mee)
convert modified equinoctial elements to classical orbit elements
-
nod(jdate)
this function evaluates the nutation series and returns the
-
nut2000b (jdate)
nutation based on iau 2000b theory
-
obliq(t)
function to compute mean obliquity of the ecliptic in arcseconds
-
oeprint1(mu, oev, ittype)
print six classical orbital elements
-
oeprint3(mu, oev, ittype)
print complete set of orbital elements
-
om_constants
astrodynamic and utility constants
-
orb2eci(mu, oev)
convert classical orbital elements to eci state vector
-
orb2hyper(oev)
this function converts classical orbital elements
-
osc2mean (oeosc)
convert osculating classical orbital elements
-
read_rv2tle(filename)
read rv2tle data file
-
readfpc1(filename)
read flight path coordinates data file
-
readgeo1(filename)
read geodetic coordinates data file
-
readleap
read leap seconds data file
-
readmee1(filename)
read modified equinoctial orbital elements data file
-
readoe1(filename)
read classical orbital elements data file
-
readsv1(filename)
read eci state vector data file
-
rv2fpc (r, v)
transform from cartesian coordinates
-
rv2hyper (mu, rsc, vsc)
convert position and velocity vectors to
-
rv2tle(reci, veci)
convert osculating position and velocity vectors
-
svprint(r, v)
print position and velocity vectors and magnitudes
-
tdb2utc (jdtdb)
convert TDB julian date to UTC julian date
-
times_novas (tdbjd)
this function computes the terrestrial time (tt) julian date
-
utc2tdb (jdutc)
convert UTC julian date to TDB julian date
-
utc2tt (jdutc)
convert UTC julian date to TT julian date
-
csystems.m
-
elong2ra.m
-
View all files
from
A MATLAB Script for Time and Coordinate Calculations
by David Eagle
Interactive MATLAB script that can be used to perform time and coordinate calculations.
|
| 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