Load with "load astro", help with "help astro.e". See also the example notebook for this package.

Astronomical functions taken from Jean Meeus "Astronomical Algorithms", Montenbruck and Pfleger "Astronomy on the Personal Computer", Duffett-Smith "Practical astronomy with your calculator", and other sources.

Written by Keith Burnett.

functionddegrees(d, m, s)

converts degrees minutes and seconds to decimal degrees

functiondsin(x)

returns sine of x degrees

functiondcos(x)

returns cosine of x degrees

functiondtan(x)

returns tangent of x degrees

functiondasin(x)

returns angle in degrees corresponding to x

functiondacos(x)

returns angle in degrees corresponding to x

functiondatan(x)

returns angle in degrees corresponding to x

functiondatan2(y, x)

returns the angle in degrees within the correct quadrant given the coordinates y, x on the unit circle

functionoverwrite day(y0, m0, d, h=0, min=0, sec=0)

Days since J2000.0 Assumes the Gregorian calendar after 1582 Oct 4th given the year, month, day, hour and minute This method is modified from Duffett-Smith Calculator page 7 Negative years CE are numbered according to the astronomical convention - i.e. calendrical year 1 BC is year zero in this function

functionjday(y0, m0, d, h=0, min=0, sec=0)

Julian day number Assumes the Gregorian calendar after 1582 Oct 4th given the year, month, day, hour and minute This method is taken from Duffett-Smith Calculator page 7

functionjdaynow()

Current Julian day number assuming the Gregorian calendar

functiongst(day)

Greenwich siderial time Corresponding to the number of days before J2000.0 (Meeus Ch 11). Answer is given in degrees (360 = siderial day)

functiongmoon(day)

Mean geocentric longitude, latitude and distance of the Moon Given the instant in days since J2000.0 based on the truncated ELP-2000/82 theory in Meeus' book C45 - claimed good to 10 arcsec in longitude, 4 arcsec in latitude.

functionnutation(day)

Values of delta-phi and delta-epsilon in degrees for UT instant. See Meeus Ch21 - good to 0.5 arcsec in phi and 0.1 arcsec in epsilon Returns a vector with entries [dphi, deps, 0] for compatibility Apparent geocentric longitude, latitude and distance of the Moon Corrected for nutation using a low precision nutation theory

functionmoontable(position, day1, day2, inc)

Table of positions of the moon Given the position function name, a starting UT instant, a stopping UT instant and a time increment. Each row of the table is a position.

functionhearth(day)

Heliocentric ecliptic latitude of the Earth Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC

functionhvenus(day)

Heliocentric ecliptic latitude of Venus Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC

functionzzterm(a, t)

calculates the value of a periodic term in the VSOP82 analytical theory for the position of the planets - called by the planet position functions

functionhjupiter(day)

Heliocentric ecliptic latitude of Jupiter Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC Accuracy of order 4 arcsec in longitude

functionhmars(day)

Heliocentric ecliptic latitude of Mars Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC More terms than Meeus included as an experiment

functionhmercury(day)

Heliocentric ecliptic latitude of Mercury Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC More terms than Meeus included as an experiment

functionhsaturn(day)

Heliocentric ecliptic latitude of Saturn Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC More terms than Meeus included as an experiment

functionhuranus(day)

Heliocentric ecliptic latitude of Uranus Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC More terms than Meeus included as an experiment

functionhneptune(day)

Heliocentric ecliptic latitude of Neptune Given the UT instant. Mean coordinates referred to equinox of date vector returned gives [lambda, beta, delta (au) ] See chapter 31 of Meeus for method - coefficients from NASA ADC More terms than Meeus included as an experiment

functionmoon(day)

Apparent geocentric equatorial coordinates of Moon Given the UT instant day.

functionequatorial(day, ecliptic, e)

given: the UT instant in day, a vector containing the ecliptic coordinates and the obliquity of the ecliptic in e. The geocentric distance r is 'passed through'. returns: the equatorial coordinates as ra (degrees) and dec and r. note: obliquity argument allows choice of apparent, mean or J2000.0 equator. Function obiquity(day) returns the mean obliquity, add nutation[2] for apparent.

functionapparent(day, ecliptic)

Apparent equatorial coordinates given: the UT instant in day and a vector containing the mean ecliptic coordinates. returns: the apparent equatorial coordinates as ra (degrees) dec and r in a.u. referred to the equinox and true ecliptic of date

functionobliquity(day)

Mean obliquity of ecliptic given: TD Instant as days since J2000.0 in 'day'

functionraltaz(day, station, equatorial)

Altitude and azimuth of object given: 'day' - TD instant 'station' - vector containing geographical longitude, latitude height and air temperature and pressure of observer. (west, south negative, decimal degrees, metres asl, degrees C and millibars) note: for the Moon, use topocentric equatorial coords from tmoon - for other objects use 'apparent' coordinates refraction correction applied as in Meeus ch 15, p102 function altaz has no refraction correction

functionaltaz(day, station, equatorial)

Altitude and azimuth of object given: 'day' - TD instant 'station' - vector containing geographical longitude, latitude height and air temperature and pressure of observer. (west, south negative, decimal degrees, metres asl, degrees C and millibars) 'equatorial' - vector of equatorial coordinates of object note: for the Moon, use topocentric equatorial coords from tmoon - for other objects use 'apparent' coordinates This function does NOT correct for refraction - see raltaz

functioncart(sph)

Cartesian coordinates of object in vector given: vector with [ra/long, dec/lat, r] of object note: assumes decimal degrees for angles

functionsph(cart)

Spherical coordinates of object in vector given: vector with cartesian coordinates of object note: returns decimal degrees for angles

functionsun(day)

Apparent equatorial coordinates of the Sun (geocentric) given: TD instant in day note: coordinates returned as vector [ra (degs), dec, r (au)] based on Meeus truncation of VSOP87 - he claims 1"

functionmeanequ(day, ecliptic)

TD instant in day and the mean ecliptic geocentric coordinates returns: the mean equatorial coordinates as ra (degrees) dec and r in a.u. referred to the equinox and mean ecliptic of date note: no nutation or aberration correction at all

functiongmer(day)

Geometric equatorial coordinates of Mercury given: the TD instant in day returns: the geometric equatorial coordinates of Mercury note: no correction for light travel time, abberation or nutation

functiongjup(day)

Geometric equatorial coordinates of Jupiter given: the TD instant in day returns: the geometric equatorial coordinates of Jupiter note: no correction for light travel time, abberation or nutation

functiongven(day)

Geometric equatorial coordinates of Venus given: the TD instant in day returns: the geometric equatorial coordinates of Venus note: no correction for light travel time, abberation or nutation

functiongmar(day)

Geometric equatorial coordinates of Mars given: the TD instant in day returns: the geometric equatorial coordinates of Mars note: no correction for light travel time, abberation or nutation

functionamar(day)

Astrometric equatorial coordinates of Mars given: the TD instant in day returns: the astrometric equatorial coordinates of Mars note: corrected for light travel time and aberration

functionvenus(day)

Apparent equatorial coordinates of Venus given: the TD instant in day returns: the apparent equatorial coordinates of Venus note: corrected for light travel time, aberration and nutation

functionmercury(day)

Apparent equatorial coordinates of Mercury given: the TD instant in day returns: the apparent equatorial coordinates of Mercury note: corrected for light travel time, aberration and nutation

functionjupiter(day)

Apparent equatorial coordinates of Jupiter given: the TD instant in day returns: the apparent equatorial coordinates of Jupiter note: corrected for light travel time, aberration and nutation

functionmars(day)

Apparent equatorial coordinates of Mars given: the TD instant in day returns: the apparent equatorial coordinates of Mars note: corrected for light travel time, aberration and nutation

functionsaturn(day)

Apparent equatorial coordinates of Saturn given: the TD instant in day returns: the apparent equatorial coordinates of Saturn note: corrected for light travel time, aberration and nutation

functionzzaplanet(planet, day)

Apparent equatorial coordinates of planet given: the TD instant in day and heliocentric coordinate function in string 'planet' returns: the apparent equatorial coordinates of planet note: corrected for light travel time, aberration and nutation this function is not normally used interactively

functiontopocentric(day, station, pos)

Topocentric equatorial coordinates of body given: function 'pos' to obtain apparent coords of body TD instant in 'day' station - lat, long, height, temp, pressure of observing location

locBrum:=[-1.91667, 52.5, 120]; locSettel:=[-2 + 18/60, 54 + 5/60, 200]; locReekie:=[-3 + 12/60, 55 + 57/60, 50]; locIngolstadt:=[11.433,48.767,400];

functiontmoon(day, station)

Topocentric equatorial coordinates of Moon given: TD instant in 'day' 'station' - vector lat, long, height (m), temp (C), and pressure (mB) of observing location

functionlibrate(day)

Selenographic longitude and latitude of the sub earth point position angle of the Moon's rotation axis given: TD instant in days since J2000.0 note: Geocentric librations as in Meeus Ch 51

functionhmsprint(x)

String with hours, minutes and seconds of day hours >hmsprint(12.5)

functionaltitude(now, planet, loc)

Altitude of the planet at now and loc. >altitude("sun",day(2008,1,2),here)

functionrise(planet, now, loc)

Next rise of planet after now at loc.

functionset(planet, now, loc)

Next set of planet after now at loc.

functionhighest(planet, now, loc)

Next highest position of planet after now at loc.

functionlowest(planet, now, loc)

Next lowest position of planet after now at loc.

functionhelpprintday1(y,t)

functionhelpprintday2(m,y,t)

functionprintday(t)

a string based on the date

functiongetymdhms(t)

vector [y,m,d,h,mi,sec] for a time date