Code covered by the BSD License
 anmp (a)
 celpol (tjd, itype, dpole...this function allows for the specification of celestial pole
 celter (tjdh, tjdl, xp, y...this function rotates a vector from the celestial to the
 ciobas (tjd, racio, k)
this function returns the orthonormal basis vectors, with
 cioloc (tjd)
this function returns the location of the celestial
 ciotio
 eect2000 (date1, date2)
equation of the equinoxes complementary terms, consistent with
 eqinox
 eqxra (tjd, k)
this function computes the intermediate right ascension
 erot (date1, date2)
this function returns the value of the earth rotation angle
 etilt (tjd)
this function computes quantities related to the orientation
 frame (pos1, k)
this function transforms a vector from the dynamical reference
 funarg (t)
this function computes fundamental arguments (mean elements)
 gdate (jdate)
convert Julian date to Gregorian (calendar) date
 getdt
this entry returns the current value of deltat
 getmod
this function returns the 'mode' value, which
 hiacc
 jd2str(jdate)
convert Julian date to string equivalent
 loacc
 nod (t)
this function returns the values for nutation in longitude and
 novas_times (tdbjd)
this function computes the terrestrial time (tt) julian date
 nut2000a (date1, date2)
nutation based on iau 2000a theory
 nut2000k (date1, date2)
nutation based on the iau 2000k theory
 nutate (tjd, pos1)
this function nutates equatorial rectangular coordinates from
 obliq(t)
function to compute mean obliquity of the ecliptic in arcseconds
 preces (tjd1, pos1, tjd2)
this function precesses equatorial rectangular coordinates from
 resume
 setdt (delt)
this function allows for the specification of the deltat value
 setmod (mode)
this function allows the user to specify the 'mode' value,
 sidtim (tjdh, tjdl, k)
this function computes the greenwich sidereal time
 spin (angl, pos1)
this function transforms a vector from one coordinate system
 tercel (tjdh, tjdl, xp, y...this function rotates a vector from the terrestrial to the
 wobble (tjd, x, y, pos1)
this function corrects a vector in the itrs (a rotating earth
 demo_tercel.m

View all files
A MATLAB Script for Terrestrial and Celestial Coordinate Conversion
by
David Eagle
18 Jan 2013
MATLAB functions and script for performing terrestrial to/from celestial coordinate transformations.

setmod (mode)

function setmod (mode)
% this function allows the user to specify the 'mode' value,
% which determines the method used for the computation of sidereal
% time and the terrestrialtocelestial transformation, and the
% accuracy of nutation and related calculations.
% mode = selection for method and accuracy (in)
% set mode = 0 for ciobased method, full accuracy
% set mode = 1 for ciobased method, reduced accuracy
% set mode = 2 for equinoxbased method, full accuracy
% set mode = 3 for equinoxbased method, reduced accuracy
% note: other entry points are provided to allow the method and
% accuracy to be specified in a more obvious way:
% mode = 0 can be set by call ciotio and call hiacc
% mode = 1 can be set by call ciotio and call loacc
% mode = 2 can be set by call eqinox and call hiacc
% mode = 3 can be set by call eqinox and call loacc
global imode lmode
lmode = imode;
imode = mode;


Contact us