ron@vicorp.com (Ron Peterson) (01/17/91)
Archive-name: astro/planets/ephem/1991-01-15 Archive-directory: mandarin.mit.edu:/astro/ephem/ [18.82.0.21] Original-posting-by: ron@vicorp.com (Ron Peterson) Original-subject: C Code for planet locations (long) Reposted-by: emv@ox.com (Edward Vielmetti) I've received a lot of requests to share any info I get on plotting the position of the planets so here's a summary of the responses I got. Given the level of interest perhaps the ephem source code should be posted also. (I've got the code but not the manual text.) From: <uunet!cc.flinders.edu.au!A.C.Beresford> <phacb@cc.flinders.edu.au> Ron, you will find formulae in 1. peter duffet-Smith's astronomy & your personal computer 2. Jean Meeus's Astronomical formulae for calculators 3. Simon & bretagne planetary positions -9000 to +4000 Code from 2 is available as the ephem program on group comp.source.misc, and i think for anon FTP from mandarin.mit.edu. IBM PC versions of ephem are also avalable on ibm.pc.binaries and on simtel20 and its copies. From: uunet!minyos.xx.rmit.OZ.AU!s882080 (Paul Taylor [Falcon]) The program Ephem by Elwood Downey (downey@dimed.com) has a text "graphics" display of the planets positions. These can be viewed as a sky-map, or a orbit position display on the solar system. If you aren't satisfied with his program (which is excellent in its own right), you can always use the routines it contains. Contact Elwood directly for information on where to get the source code. From: Steve Penton <uunet!ssl.Berkeley.EDU!spenton> Here is a manpage that I found, I don't know if its what we use. starchart(LOCAL) UNKNOWN SECTION OF THE MANUAL starchart(LOCAL) NAME planet, epoch - print phase of the Moon and planetary information, precess data in .star file format. SYNOPSIS planet [juliandate] or planet [-z timezone -m month -d day -y year -t hh.mm ] epoch [ inputepoch ] [ outputepoch ] DESCRIPTION These programs generate and maintain star chart data in the for- mat used by the starchart software tools. Planetary information is generated by the program planet, which calculates locations a given Julian date, or for the current time (given no arguments). In common use, an alternate syntax is pro- vided to simplify the calculation of the Julian date, in which integers for month, day, (mandatory), and year are given. Time is specified in the form hh.mm or hh on a 24-hour clock and defaults to 0.00 (midnight). The -z flag (same format as -t) gives the number of hours the observer is west of GMT (see below). A summary is then printed on the standard output giving the right ascension, declination and distance (in AU's) for the Sun and all planets except Pluto. This data is additionally placed in the file planet.star for subsequent use by charting software. The program epoch converts right-ascension and declination data within yale.star style datasets from epoch 1975.0 into the epoch 2000.0. Either the first or both epoch dates may be overridden with command line parameters (floating point values). The data is read and written from the standard input and output. Because only the coordinate data is updated within each line item, the program may be used on either versions of the reduced Yale data. BUGS Daylight savings time may have to be reckoned for in planet, as the default -z value during periods of daylight time may or may not be adjusted relative to GMT. The required code changes would make planet installation dependent. AUTHORS planet - F.T. Mendenhall <ihnp4!inuxe!fred> Jim Cobb epoch - Alan Paeth, University of Waterloo <AWPaeth@watCGL> -Craig Counterman <ccount@athena.mit.edu> yale.star - Robert Tidd <inp@VIOLET.BERKELEY.EDU> messier.star - Bob Tidd and Alan Paeth SOURCES planet - Astronomical Formulae for Calculators by Jean Meesus Solbourne Computer, Inc. 6/2/87 1 starchart(LOCAL) UNKNOWN SECTION OF THE MANUAL starchart(LOCAL) epoch - Celestial BASIC by Eric Burgess (SYBEX 1982) Astro- nomical Almanac Solbourne Computer, Inc. 6/2/87 2 From: uunet!RELAY.CS.NET!randall%thor.sandiego.ncr.com Elwood Downey posted to the net an ephemeris program in c that displays the sun, all planets, some asteroid and comets, but all from a geocentric, not heliocentric position. The program has several display modes. From: uunet!EPS.GVL.Unisys.Com!joef (Joe Fedock) EMail downey@dimed.com and ask for ephem. Has C code and probably does all you need to do. The gentleman's name is Elwood Downey. I've been using ephem for about a year now. I also use it to generate the comet ephemerides that I regularly post to sci.astro. I don't think you'll be disappointed. The only other routine that I know of that is more accurate is ICE from the Floppy Almanac office of the USNO in Washington, DC. That is written for a PC and is highly accurate, but not nearly as versitile or nice to use as Elwood's program.