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.
|
| coe2eqoe(coe)
|
function eqoe = coe2eqoe(coe)
% convert classical orbital elements to
% equinoctial orbital elements
% convert classical orbital elements to
% equinoctial orbital elements
% input
% coe(1) = semimajor axis (kilometers)
% coe(2) = orbital eccentricity (non-dimensional)
% (0 <= eccentricity < 1)
% coe(3) = orbital inclination (radians)
% (0 <= inclination <= pi)
% coe(4) = argument of perigee (radians)
% (0 <= argument of perigee <= 2 pi)
% coe(5) = right ascension of ascending node (radians)
% (0 <= raan <= 2 pi)
% coe(6) = true anomaly (radians)
% (0 <= true anomaly <= 2 pi)
% output
% eqoe(1) = semimajor axis (kilometers)
% eqoe(2) = e * sin(argument of perigee + raan)
% eqoe(3) = e * cos(argument of perigee + raan)
% eqoe(4) = tan(i/2) * sin(raan)
% eqoe(5) = tan(i/2) * cos(raan)
% eqoe(6) = mean anomaly + raan + argument of perigee
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global retro
% compute mean anomaly
a = sin(coe(6)) * sqrt(1 - coe(2) * coe(2));
b = coe(2) + cos(coe(6));
eanom = atan3(a, b);
manom = mod(eanom - coe(2) * sin(eanom), 2.0 * pi);
if (coe(3) > 0.5 * pi)
retro = -1;
else
retro = 1;
end
eqoe(1) = coe(1);
eqoe(2) = coe(2) * sin(coe(4) + coe(5) * retro);
eqoe(3) = coe(2) * cos(coe(4) + coe(5) * retro);
if (retro == 1)
eqoe(4) = tan(0.5 * coe(3)) * sin(coe(5));
eqoe(5) = tan(0.5 * coe(3)) * cos(coe(5));
else
if (coe(3) >= pi)
eqoe(4) = 0;
eqoe(5) = 0;
else
eqoe(4) = sin(coe(5)) / tan(0.5 * coe(3));
eqoe(5) = cos(coe(5)) / tan(0.5 * coe(3));
end
end
eqoe(6) = mod(manom + coe(4) + coe(5) * retro, 2.0 * pi);
|
|
Contact us