Code covered by the BSD License
-
aberat (pos1, ve, tlight)
this function corrects position vector for aberration of light.
-
angles (pos)
this function converts a vector to angular quantities
-
applan1 (tjd, ujd, l, n, topo...
this function computes the apparent geocentric or topocentric place
-
atan3 (a, b)
four quadrant inverse tangent
-
brent (f, x1, x2, rtol)
solve for a single real root of a nonlinear equation
-
broot (f, x1in, x2in, factor,...
bracket a single root of a nonlinear equation
-
deg2dms (dd)
convert decimal degrees to degrees,
-
etilt1 (tjd)
this function computes quantities related to the orientation
-
findleap(jdate)
find number of leap seconds for utc julian date
-
funarg (t)
this subroutine computes fundamental arguments (mean elements)
-
gast2 (tjdh, tjdl, k)
this function computes the greenwich sidereal time
-
gdate (jdate)
convert Julian date to Gregorian (calendar) date
-
geocen (pos1, pe)
this function moves the origin of coordinates from the
-
getdate
interactive request and input of calendar date
-
getobs
interactive request of observer coordinates
-
hrs2hms (hrs)
convert decimal hours to hours,
-
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
-
minima (f, a, b, tolm)
one-dimensional minimization
-
nutate1 (tjd, pos1)
this function nutates equatorial rectangular coordinates from
-
nutation (jdate)
nutation in longitude and obliquity
-
oevent1 (objfunc, prtfunc, ti...
predict minimization/root-finding orbital events
-
precess (tjd1, pos1, tjd2)
this function precesses equatorial rectangular coordinates from
-
readleap
read leap seconds data file
-
seclevnt (objfunc, prtfunc, t...
predict solar eclipse circumstances
-
seclfunc(x)
solar eclipse objective function
-
seclprt(iflag, jdutc)
print solar eclipse conditions
-
solsys (tjd, body, origin)
purpose
-
sunfld (pos1, pe)
this function corrects position vector for the deflection
-
tdtimes (tdbjd)
this function computes the terrestrial time (tt)
-
terra (glon, glat, ht, st)
this functions computes the position and velocity vectors of
-
utc2tdt (jdutc)
convert UTC julian date to TDT julian date
-
seclipse.m
-
View all files
from
A MATLAB Script for Predicting Solar Eclipses
by David Eagle
Predict local circumstances of solar eclipses.
|
| angles (pos)
|
function [ra, dec] = angles (pos)
% this function converts a vector to angular quantities
% input
% pos = position vector, equatorial rectangular coordinates
% output
% ra = right ascension in hours
% dec = declination in degrees
% Orbital Mechanics with Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
seccon = 206264.8062470964;
xyproj = sqrt(pos(1)^2 + pos(2)^2);
r = atan2(pos(2), pos(1));
d = atan2(pos(3), xyproj);
ra = r * seccon / 54000.0;
dec = d * seccon / 3600.0;
if (ra < 0.0)
ra = ra + 24;
end
|
|
Contact us