Code covered by the BSD License
-
atan3 (a, b)
four quadrant inverse tangent
-
cae2o(x)
Earth-to-object closest approach objective function
-
cae2oprt(jdate)
print Earth-to-object closest approach conditions
-
caeqm (time, y)
heliocentric equations of motion
-
caevent(objfunc, prtfunc, ti,...
predict close approach events
-
eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
-
gdate (jdate)
convert Julian date to Gregorian (calendar) date
-
hel_eqm (t, y)
heliocentric equations of motion
-
heqms (t, y)
first order form of the heliocentric equations of motion
-
jd2str(jdate)
convert Julian date to string equivalent
-
jplephem (et, ntarg, ncent)
reads the jpl planetary ephemeris and gives
-
julian (month, day, year)
Julian date
-
kepler1 (manom, ecc)
solve Kepler's equation for circular,
-
keycheck
pause and request user input
-
minima (f, a, b, tolm)
one-dimensional minimization
-
oeprint(mu, oev)
print six classical orbital elements
-
orb2eci(mu, oev)
convert classical orbital elements to eci state vector
-
readoe2(filename)
read orbital elements data file
-
rkf78 (deq, neq, ti, tf, h, t...
solve first order system of differential equations
-
svprint(r, v)
print position and velocity vectors and magnitudes
-
uvector(x)
unit vector
-
cae2ho.m
-
View all files
from
Closest Approach Between the Earth and Heliocentric Objects
by David Eagle
MATLAB script that predicts closest approach between the Earth and heliocentric objects.
|
| cae2oprt(jdate)
|
function cae2oprt(jdate)
% print Earth-to-object closest approach conditions
% required by cae2ho.m
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global aunit drsaved
% convert julian day to calendar date and time strings
[cdstr, utstr] = jd2str(jdate);
fprintf('\n\ntime and conditions at closest approach');
fprintf('\n=======================================\n\n');
fprintf('calendar date ');
disp(cdstr);
fprintf('\nTDB time ');
disp(utstr);
fprintf('\nTDB Julian date %16.8f \n\n', jdate);
% display slant range
fprintf('geocentric distance %16.8f AU \n\n', drsaved);
fprintf('geocentric distance %16.8f km \n\n', aunit * drsaved);
|
|
Contact us