home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume28
/
ephem
/
part01
next >
Wrap
Text File
|
1992-03-15
|
56KB
|
1,380 lines
Newsgroups: comp.sources.misc
From: e_downey@hwking.cca.cr.rockwell.com (Elwood C. Downey)
Subject: v28i084: ephem - an interactive astronomical ephemeris, v4.28, Part01/09
Message-ID: <csm-v28i084=ephem.155600@sparky.IMD.Sterling.COM>
X-Md4-Signature: 3979de5aaf5414fdf9d087b2ab640df9
Date: Tue, 10 Mar 1992 21:56:23 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: e_downey@hwking.cca.cr.rockwell.com (Elwood C. Downey)
Posting-number: Volume 28, Issue 84
Archive-name: ephem/part01
Environment: UNIX, VMS, DOS, MAC
Supersedes: ephem-4.21: Volume 14, Issue 76-81
Ephem is a program that displays ephemerides for all the planets plus any
two additional objects. The additional objects may be fixed or specified
via heliocentric elliptical, hyperbolic or parabolic orbital elements to
accommodate solar system objects such as asteroids or comets.
Information displayed about each object includes RA and Dec precessed to
any epoch, local azimuth and altitude, heliocentric coordinates, distance
from sun and earth, solar elongation, angular size, visual magnitude,
illumination percentage, local rise, transit and set times, length of time
up, constellation, and angular separations between all combinations of
objects. A special detail of Jupiter's moons and central meridian
longitude is also available.
Observing circumstance information includes UTC and local date and time,
local sidereal time, times of astronomical twilight, length of day and
night, local temperature, pressure and height above sea level for the
refraction model and a monthly calendar.
RA/Dec calculations are geocentric and include the effects of light travel
time, nutation, aberration and precession. Alt/az and rise/set/transit
and, optionally, angular separation calculations are topocentric and
include the additional effects of parallax and refraction.
Plot and listing files of selected field values may be generated as the
program runs. The plot files are full precision floating point values in
ASCII intended for export to other plotting programs. The listing files
are tables formatted for more general human reading. Ephem includes
simple quick-look facilities to view these files.
One may watch the sky or the solar system with a simple character-oriented
screen display.
Ephem may be asked to search for interesting conditions automatically,
using several algorithms. Most fields displayed on the screen may be used
as terms in an arbitrary arithmetic expression that can be solved for
local zero or extrema, or the time of state change of any boolean
expression can be found.
The program is some 11,000 lines of C. It uses only a very simple set of
io routines and should be easily ported to any 24x80 ANSI/ASCII display.
To date, it has been ported to several flavors of Unix, VMS, MS-DOS and,
simplistically, the Macintosh using Think-C.
------------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# Contents: Man.txt.a riset_c.c
# Wrapped by kent@sparky on Tue Mar 10 14:34:04 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 1 (of 9)."'
if test -f 'Man.txt.a' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Man.txt.a'\"
else
echo shar: Extracting \"'Man.txt.a'\" \(41589 characters\)
sed "s/^X//" >'Man.txt.a' <<'END_OF_FILE'
X
X
X
X
X
X
X
X Ephem V4.28 - February 24, 1992
X
X Copyright (c) 1990,1991,1992 by Elwood Charles Downey
X
X
X
X Table of Contents
X 1. Introduction ................................................... 3
X 1.1. References and Acknowledgements .............................. 3
X 2. Running Ephem .................................................. 4
X 2.1. Command Line Format .......................................... 4
X 2.2. Program Operation ............................................ 4
X 3. Screen Fields .................................................. 6
X 3.1. Top Screen Fields ............................................ 6
X 3.2. The "OCX" column ............................................. 7
X 3.3. Data format columns .......................................... 8
X 3.4. RiseSet format columns ....................................... 8
X 3.5. Separation format fields ..................................... 9
X 3.6. Jupiter Aux .................................................. 9
X 4. Date and Time Formats .......................................... 9
X 5. Configuration File ............................................. 10
X 5.1. Configuration File fields .................................... 10
X 5.2. Example ephem.cfg ............................................ 12
X 6. Menu options ................................................... 12
X 6.1. Adaptive vs. Standard hzn .................................... 12
X 6.2. Geocentric vs. Topocentric ................................... 13
X 7. User Defined Objects: X and Y .................................. 13
X 7.1. Controlling Object-X or Y Operation .......................... 13
X 7.1.1. Fixed ...................................................... 14
X 7.1.2. Elliptical ................................................. 14
X 7.1.3. Hyperbolic ................................................. 14
X 7.1.4. Parabolic .................................................. 15
X 7.1.5. Lookup ..................................................... 15
X 7.1.6. On or Off .................................................. 15
X 7.2. Magnitude models ............................................. 16
X 7.2.1. g/k model .................................................. 16
X 7.2.2. H/G model .................................................. 16
X 7.3. Database File ................................................ 17
X 8. Plotting ....................................................... 17
X 8.1. Defining plot fields ......................................... 18
X 8.2. Displaying a plot file ....................................... 18
X 8.3. Cartesian or Polar coords .................................... 18
X 8.4. Begin Plotting ............................................... 18
X 8.5. Stopping Plotting ............................................ 19
X 9. Listing ........................................................ 19
X 10. Watching ...................................................... 19
X 10.1. Trails ...................................................... 19
X 10.2. Sky dome .................................................... 19
X 10.3. Alt/az sky .................................................. 19
X 10.4. Solar System ................................................ 20
X 11. Searching ..................................................... 20
X 11.1. Find extreme ................................................ 20
X 11.2. Find 0 ...................................................... 21
X
X
X
X
X
X
X
X
X
X - 2 -
X
X
X 11.3. Binary ...................................................... 21
X 11.4. Define a New function ....................................... 21
X 11.4.1. Intrinsic functions ....................................... 21
X 11.4.2. Field Specifiers .......................................... 22
X 11.4.3. Constants ................................................. 22
X 11.4.4. Operators ................................................. 22
X 11.5. Specifying Search Accuracy .................................. 23
X 11.6. Stop ........................................................ 23
X 11.7. Example Searches ............................................ 23
X 11.8. Another Example ............................................. 24
X 11.9. Caution ..................................................... 24
X 12. Implementation Notes .......................................... 24
X 12.1. Program limits .............................................. 25
X 13. DOS Installation Procedure .................................... 26
X 13.1. Setting TZ .................................................. 26
X 14. Known Bugs and Wish List ...................................... 27
X 15. Sample Screens ................................................ 28
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X - 3 -
X
X
X 1. Introduction
X
X Ephem is a program that displays ephemerides for all the planets plus any
X two additional objects. The additional objects may be fixed or specified
X via heliocentric elliptical, hyperbolic or parabolic orbital elements to
X accommodate solar system objects such as asteroids or comets.
X
X Information displayed about each object includes RA and Dec precessed to
X any epoch, local azimuth and altitude, heliocentric coordinates, distance
X from sun and earth, solar elongation, angular size, visual magnitude,
X illumination percentage, local rise, transit and set times, length of time
X up, constellation, and angular separations between all combinations of
X objects. A special detail of Jupiter's moons and central meridian
X longitude is also available.
X
X Observing circumstance information includes UTC and local date and time,
X local sidereal time, times of astronomical twilight, length of day and
X night, local temperature, pressure and height above sea level for the
X refraction model and a monthly calendar.
X
X RA/Dec calculations are geocentric and include the effects of light travel
X time, nutation, aberration and precession. Alt/az and rise/set/transit
X and, optionally, angular separation calculations are topocentric and
X include the additional effects of parallax and refraction.
X
X Plot and listing files of selected field values may be generated as the
X program runs. The plot files are full precision floating point values in
X ASCII intended for export to other plotting programs. The listing files
X are tables formatted for more general human reading. Ephem includes
X simple quick-look facilities to view these files.
X
X One may watch the sky or the solar system with a simple character-oriented
X screen display.
X
X Ephem may be asked to search for interesting conditions automatically,
X using several algorithms. Most fields displayed on the screen may be used
X as terms in an arbitrary arithmetic expression that can be solved for
X local zero or extrema, or the time of state change of any boolean
X expression can be found.
X
X The program is some 11,000 lines of C. It uses only a very simple set of
X io routines and should be easily ported to any 24x80 ASCII display. To
X date, it has been ported to several flavors of Unix, VMS, MS-DOS and,
X simplistically, the Macintosh using Think-C.
X
X 1.1. References and Acknowledgements
X
X The planetary polynomials and correction algorithms are taken, with
X permission, from "Astronomy With Your Personal Computer", by Peter
X Duffett-Smith, Cambridge University Press, (c) 1985.
X
X The constellation determination algorithm is from a paper by Nancy G.
X Roman, "Identification of a constellation from a position", Publications
X of the Astronomical Society of the Pacific, Vol. 99, pages 695-699, July
X
X
X
X
X
X
X
X
X
X - 4 -
X
X
X 1987.
X
X The precession routine is from 1989 Astronomical Almanac.
X
X Jupiter's moons are based on information in "Astronomical Formulae for
X Calculators" by Jean Meeus. Richmond, Va., U.S.A., Willmann-Bell, (c)1982.
X This reference is suitable for identification purposes but is not accurate
X enough for precise occultation work.
X
X I would like to thank Craig Counterman for his very competent assistance,
X Joseph Fedock for his faithful testing and encouragement, Karsten Spang,
X Richard Dyson, Doug McDonald and Peter Newton for their contributions in
X porting ephem to various systems, and the many others who have made
X helpful suggestions along the way. Finally, I would like to thank all of
X you who actually use ephem; it is most gratifying to make a program from
X which others derive value.
X
X 2. Running Ephem
X
X
X 2.1. Command Line Format
X
X To run ephem, just type "ephem". You may also specify an alternate
X configuration file, an alternate database file, and specify initial values
X for several screen fields. The command line syntax can be summarized as
X follows:
X
X ephem [-c <config_file>] [-d <database_file>] [field=value ...]
X
X
X The default configuration file is named ephem.cfg in the current
X directory. Ephem also looks for one named by the EPHEMCFG environment
X variable, if it is set. You may specify an arbitrary name with the -c
X option.
X
X The default database file is named ephem.db in the current directory.
X Ephem also looks for one named by the EPHEMDB environment variable, if it
X is set. You may specify an arbitrary name with the -d option.
X
X The exact format of these files is described below.
X
X Any additional command line arguments are treated exactly as if they too
X came from the configuration file.
X
X 2.2. Program Operation
X
X When ephem starts, it first displays a disclaimer banner. Then, after any
X key is pressed, it reads the configuration file and processes the command
X line arguments to set the initial values of several fields, accessing the
X database file if OBJX or OBJY is set, It then draws all fields on the
X screen with their initial values. The program then loops advancing time
X each step, by some amount you may control, and updating all fields each
X loop.
X
X
X
X
X
X
X
X
X
X
X - 5 -
X
X
X There are three fields that control this looping behavior. NStep controls
X the number of steps, StpSz the amount of time to add each step, and Pause
X is the amount of real seconds to pause between steps. Ephem does not
X pause between steps when plotting or searching is on. When the number of
X steps, NStep, goes to 0 or any key is pressed, the looping stops and you
X enter a command mode.
X
X Command mode allows you to modify most of the fields. The idea is that
X you move to each field on the screen you wish to change and change it.
X When you have changed everything you want to, type "q" to resume screen
X updates.
X
X To change a field:
X
X 1) move the cursor to the field (see below);
X 2) type RETURN;
X 3) type in the new value along the command line at the top according
X to the format indicated in the prompt. To accept the new value
X type RETURN, or to leave it unchanged after all type "q".
X
X
X A few fields don't require you to type anything; just typing RETURN does
X all the work. If you can't move to it, you can't change it.
X
X The arrow keys on most systems move the cursor around. If these do not
X function or function incorrectly, the h/j/k/l keys also move the cursor
X left/down/up/right, respectively. Motions off any edge of the screen will
X wrap around.
X
X Several "hot-keys" move the cursor immediately to frequently used fields.
X You may move the cursor immediately to a planet row by typing one of the
X characters SMevmJsunpxy. "x" and "y" are for the user-defined objects X
X and y on the bottom rows. Also, the characters c, d, o, w, L and z move
X you to the Menu, UT Date, Epoch, Watch, Listing and StpSz fields
X immediately.
X
X When you have changed a field that would invalidate any of the other
X fields the message NEW CIRCUMSTANCES appears in the top center of the
X screen. This will remain until you type "q" to allow at least one screen
X update loop to occur. If you change any field that causes new
X circumstances, the StpSz value is not added to the first loop. Note also
X that after a series of loops, NStep is automatically reset to 1 so "q"
X will do exactly one loop and return you to command mode.
X
X On some systems, you may temporarily escape from ephem while in command
X mode to run your operating system's command interpretor. This is done by
X typing an exclamation point (!) followed by your command. When the
X command completes, you will return back to ephem where you left off.
X
X To quit the program, type control-d from command mode. For a little more
X help, type ?. The entire screen may be erased and redrawn with control-l.
X
X
X
X
X
X
X
X
X
X
X
X
X - 6 -
X
X
X 3. Screen Fields
X
X The screen is divided into two halves, top and bottom. The top fields are
X always present. They define the general observing circumstances and
X control features.
X
X The bottom half has several different forms. In three of the possible
X forms the planets and two additional objects are displayed in a table.
X There is one object per row, and several columns. The three forms of this
X portion selected by picking the Menu selection.
X
X The fourth form is a display of the planetocentric coordinates of the
X Galilean moons of Jupiter, including a simple graphical display of their
X locations as seen from Earth, and the central meridian longitude, in two
X of the adopted rotational systems.
X
X Some things may be turned off to reduce compute times. Calculations for
X each planet may be turned on and off by selecting the planet name field.
X Calculations for Dawn/Dusk/NiteLn may be turned off by selecting any of
X these fields. Planet positions are only updated as often as necessary to
X match the display precision of the screen unless plotting or searching is
X on. In these cases full precision is desired at all times and so
X positions are always fully recalculated at each iteration.
X
X Follows is a list and description of each of the fields in each section.
X Following each name a parenthetical "p" indicates the field may be
X selected for plotting (see later). All fields may be selected for
X changing.
X
X
X 3.1. Top Screen Fields
X
X LTZ the local timezone name. The name field may be changed to
X any three-character mnemonic.
X LT(p)
X LD(p) The local time and date are not labeled as such but are to
X the right of the local timezone name. They are individually
X selectable. Time and date fields may be changed as
X described in a later section. Set to "n" to set to "now"
X from computer clock.
X UT(p)
X UD(p) The universally coordinated time and date are not labeled as
X such but are to the right of the UTC label. They are
X individually selectable. Time and date fields may be
X changed as described in a later section. Set to "n" to set
X to "now" from computer clock.
X JulianDat(p) the current Julian date, to about 1-second accuracy.
X Listing controls listing; see complete discussion below.
X Watch selects the sky dome, altitude/azimuth sky or solar system
X displays; see complete discussion below.
X Search controls the automatic search feature of ephem. See the
X complete discussion below.
X Plot controls plotting; see complete discussion below.
X Menu controls which menu is in the bottom half of the screen.
X
X
X
X
X
X
X
X
X
X - 7 -
X
X
X See their complete discussion below.
X LST(p) the current local sidereal time. set to "n" to set from
X computer clock.
X Dawn(p) local time when the sun center is 18 degrees below the
X horizon before sunrise today.
X Dusk(p) local time when the sun center is 18 degrees below the
X horizon after sunset today.
X NiteLn(p) length of astronomical night, ie, Dawn - Dusk. If this line
X is shown as "-----", it means the sun is either always below
X or always above approximately -18 degrees altitude on this
X particular day. This and the Dawn and Dusk lines are blank
X when their computation has been turned off.
X NStep The number of times the display with be updated (time
X advanced by StpSz each step) before entering command mode.
X StpSz the amount of time UTC (and its derivatives) is incremented
X each loop. set this to "r" to use real-time based on the
X computer clock. you may also set it in terms of days by
X appending a "d" after the number when you set it.
X Lat(p) location latitude, positive degrees north of equator.
X Long(p) location longitude, positive degrees west of Greenwich
X meridian. set to "N" to set from computer clock.
X Elev(p) local elevation of the ground above sea level, in feet. (see
X implementation notes).
X Temp(p) local surface air temperature, in degrees F.
X AtmPr(p) local surface air pressure, in inches of mercury.
X TZ(p) hours local time is behind utc, ie, positive west or
X negative east of Greenwich.
X Epoch the epoch, to the nearest 0.1 years, to which the ra/dec
X fields are precessed. This says (OfDate) when coordinates
X are not precessed, ie, are in the epoch of date. Set to "e"
X to set to epoch of date.
X Pause number of seconds to pause between screen updates. This is
X used mainly to set up for free-running unattended operation.
X This pause also applies to free-running "watch" screen
X updates. Pausing is not done when plotting or searching is
X on. If pausing is used with StpSz set to RT CLOCK and the
X time was set with Now then ephem attempts to synchronize the
X time to an integral multiple of pause seconds after the
X minute, for aesthetic reasons.
X
X Also in the upper right of the screen is a calendar for the current local
X month. Dates of local new and full moons are marked NM and FM,
X respectively.
X
X
X 3.2. The "OCX" column
X
X The left column of the bottom screen, when displaying planetary
X information, is labeled "OCX". This is short for "Object-Constellation-
X eXtra". It is actually one, two or three adjacent one-column pickable
X fields. Select the first column of the name to toggle the display and
X calculations on and off. Select the second column of the name to show the
X constellation in which the object currently resides. If available, the
X third column of a planet name can be picked to display additional current
X
X
X
X
X
X
X
X
X
X - 8 -
X
X
X information relating to the planet. At this time, this feature is only
X available for Jupiter.
X
X 3.3. Data format columns
X
X R.A.(p) apparent geocentric right ascension of object, precessed to
X given epoch, in hours, minutes and decimal minutes.
X Dec(p) apparent geocentric declination of object, precessed to
X given epoch, in degrees and minutes.
X Az(p) degrees eastward of true north for object.
X Alt(p) degrees up from a horizontal plane Elev feet above sea
X level.
X H Long(p) true heliocentric longitude, in degrees. Earth's is
X displayed on the sun's line. For the moon this is the
X geocentric longitude.
X H Lat(p) true heliocentric latitude, in degrees. For the moon this
X is the geocentric latitude.
X Ea Dst(p) true distance from Earth center to object center, in AU,
X except distance to the moon is in miles.
X Sn Dst(p) true distance from sun center to object center, in AU.
X Elong(p) spherical angular separation between sun and given object,
X calculated from the their geocentric ecliptic coordinates.
X Note this is not just the difference in ecliptic longitude.
X The sign, however, is simply sign(obj's longitude - sun's
X longitude), ie, degrees east. thus, a positive elongation
X means the object rises after the sun. This field is not
X generally useful in searching for conjunctions because of
X the discontinuous sign change that occurs at conjunction.
X Size(p) angular size of object, in arc seconds.
X VMag(p) visual magnitude of object.
X Phs(p) percent of visible surface in sunlight. Note the moon phase
X is calculated simplistically as just abs(elongation)/180*100
X which can be a few degrees off... this means that because of
X how elongation is defined it doesn't say 0 during new moon
X (or 100 during full) except during close eclipses (maybe
X that's a "feature"?).
X Also, some terminals scroll when a character is written to the lower right
X character position. To avoid this, Object Y's phase is left shifted by one
X column. This can look particularly ugly when the phase is 100% because the
X "100" is right next to visual magnitude number.
X If desired, the angle between Earth and Sun from the object, p, can be
X computed from the illumination percentage, i, with the following relation:
X
X cos (p) = i/50 - 1
X
X
X 3.4. RiseSet format columns
X Rise Time
X Rise Az The local time and azimuth when the upper limb of the object
X rises today.
X Transit Time
X Transit Alt The local time and altitude when the object crosses the
X meridian today, ie, when its azimuth is true south or, if no
X precession, when the local sidereal time equals the object's
X
X
X
X
X
X
X
X
X
X - 9 -
X
X
X right ascension.
X Set Time
X Set Az The local time and azimuth when the upper limb of the object
X sets today.
X Hours Up The number of hours the object is up on the local date.
X
X Horizon displacement may be calculated in either of two ways; see the
X horizon discussion in the Menu selection section.
X
X Various oddball conditions are accounted for, including an object that is
X up sometime during the day but that doesn't rise, transit or set as such
X on that day, an object that is circumpolar or that is never up or one that
X rises twice on the same day. These are marked as "Never rises", "Never
X transits", "Never sets", "Circumpolar", "Never up" or appended with a plus
X "+" sign, respectively.
X
X 3.5. Separation format fields
X This format is a table of angular separations between each pair of
X objects. These angles are based on the local altitude/azimuth, and so in
X general differ somewhat from the elongations reported for the sun in the
X Data menu.
X Unfortunately, with the format "ddd:mm", there is not enough room for a
X space between columns when the angle is at least 100 degrees. To avoid
X this, ephem drop the minutes portion if the (rounded) angle is at least
X 100 degrees.
X
X 3.6. Jupiter Aux
X This menu option is a table of X, Y and Z coordinates for each of the
X moons of Jupiter known to Galileo Galilei, that is, its four brightest.
X The coordinate system is such that the xy plane is the mean plane of the
X moons orbits, with +x to the east, +y to the north, and +z towards earth.
X The y coordinate is corrected for earth's angular displacement above or
X below this plane.
X The menu also displays the longitude of the central meridian of Jupiter.
X Three rotational systems have been adopted for this purpose; we show the
X two that are useful to visual work.
X
X 4. Date and Time Formats
X Times are displayed and entered in h:m:s format. If you pick a time field
X to change it any of the h, m, and s components that are not specified are
X left unchanged from their current value. For example, 0:5:0 set hours to
X 0, minutes to 5, seconds to 0, whereas :5 sets minutes to 5 but leaves
X hours and seconds unchanged. A negative time is indicated by a minus sign
X (-) anywhere before the first digit.
X
X Dates are displayed and entered in American month:day:year format. As
X with time, components omitted when entering a new value retain the current
X value. For example, if the current date is 10/20/1988 and you type 20/20
X the new date will become 20/20/1988. Note you must type the full year
X since the program is accurate over several centuries either side of 1900.
X If you change the date, the time (ie, partial day) will not change.
X
X Negative years indicate BC dates. For example, Jan 1, 1 BC is given as
X 1/1/-1. There is no year 0.
X
X
X
X
X
X
X
X
X
X - 10 -
X
X
X Two other ways to set the date are supported for compatibility with some
X published comet ephemerides. You may enter the day portion as a real
X number. When you set the day this way, the time will also change to
X correspond to the fractional portion of the day.
X
X You may also enter a date as a decimal year, as in 1990.12345. This is
X also useful in interpreting plot files that include a date field, since
X date fields are stored in plot files as decimal years. If no decimal
X point is included, the number is assumed to be a year unless it is in the
X range 1-12, in which case it will be taken to mean that you are just
X changing the month of the current date. To actually specify the years 1 -
X 12, you must append a decimal point to distinguish them from months.
X
X As a matter of typing convenience, the program accepts most any character
X as the separator; you don't have to type a perfect ":" or "/".
X
X 5. Configuration File
X The ephem.cfg configuration file allows you to set the initial values of
X many of the screen fields. You can still change any field while the
X program is running too; this file just sets the initial conditions. Note
X that the order of entries in this file is important because they each take
X effect immediately. You should put them in the same order you wish them
X to be processed, just as though you were changing the fields interactively
X within ephem.
X
X The default name of the file is ephem.cfg. Ephem also looks for one named
X by the EPHEMCFG environment variable (if defined) or you may specify any
X name using the -c command line option.
X
X The format of the file uses the form KEYWORD=VALUE, where the possible
X KEYWORDS and the types of VALUES for each are described below. Any
X KEYWORDS not in the file will take on some sort of default. The separator
X need not be an actual equals sign; any char will do because the VALUE is
X assumed to start one character after the KEYWORD, regardless.
X
X All lines that do not begin with an alpha character (a through z, either
X case) are ignored and may be used for comments.
X
X Note: because of the way unspecified time and date components are left
X unchanged (see section on Date and Time Formats) always specify the
X complete time and date for all entries in the configuration file. For
X example, to initialize the longitude to zero degrees, say 0:0:0, not just
X 0.
X
X 5.1. Configuration File fields
X UD initial UTC date, such as 10/20/1988, or "NOW" to use the
X computer clock.
X UT initial UTC time, such as 12:0:0, or "NOW" to use the computer
X clock.
X TZONE hours the local time is behind utc, such as 5:0:0. you need not
X set this if you use "NOW" for UT or UD.
X TZNAME name of the local time zone, such as CDT. 3 chars max. you need
X not set this if you use "NOW" for UT or UD.
X LONG longitude, in degrees west of Greenwich, in the form d:m:s.
X
X
X
X
X
X
X
X
X
X - 11 -
X
X
X LAT latitude, in degrees north of the equator, in the form d:m:s.
X HEIGHT height above sea level, in feet, such as 800
X TEMP air temperature, in degrees F, such as 50
X PRES air pressure, in inches of Mercury, such as 29
X STPSZ the time increment between screen updates, such as "1" to give
X one hour updates. this can be a specific amount or RTC to use
X the system clock as a real-time source. You may also specify a
X time in days, by appending a D (or d) after the number.
X PROPTS this selects what you want included initially in the display.
X since IBM-PC math is not very fast, you can reduce the time to
X update the screen by only printing those fields of interest. the
X VALUE is a collection of letters to turn on each item from the
X following set:
X
X T twilight (dawn-dusk)
X S circumstances for the sun
X M circumstances for the moon
X e circumstances for mercury
X v circumstances for venus
X m circumstances for mars
X j circumstances for jupiter
X s circumstances for saturn
X u circumstances for uranus
X n circumstances for neptune
X p circumstances for pluto
X x circumstances for object X
X y circumstances for object Y
X
X For example, to just track the sun and saturn, say PROPTS=Ss
X
X If the delimiter between PROPTS and the selection is a plus (+)
X sign then the given planets are included IN ADDITION TO ones
X already specified. Any other delimiter sets the selection to
X exactly the set specified. This feature was added so that the
X command line version of using PROPTS could add to the set of
X planets giving in the configuration file.
X NSTEP number of times program will loop before entering command mode.
X see the discussion under Program Operation.
X EPOCH this sets the desired ra/dec precession epoch. you can put any
X date here or EOD to use the current instant ("Epoch of Date").
X OBJX
X OBJY These fields specify the optional objects "x" and "y" by naming
X any item in the database file. The form is OBJX=xyz, where xyz
X must be in the database file, case sensitive. You may define
X one object of each type for each of OBJX and OBJY; the last one
X defined will be the "current" one when ephem gets going.
X PAUSE The number of seconds to pause between calculation steps. See
X definition of the Pause field in the "Top Screen Fields"
X section.
X MENU establishes the initial bottom screen menu type. This should be
X one of the keywords DATA, RISET, SEP or JUP. There is no way to
X set horizon or center suboptions at this time.
X
X
X
X
X
X
X
X
X
X
X
X - 12 -
X
X
X 5.2. Example ephem.cfg
X
X This is the ephem.cfg file that was in effect when the sample screens (in
X another section) were generated. You might run ephem with this
X configuration file and compare with the samples as a check.
X
X UT=0;0;0
X UD=5/1/1990
X TZNAME=CDT
X TZONE=5
X LONG=93:42:8
X LAT=44:50:37
X HEIGHT=800
X TEMP=40
X PRES=29.5
X STPSZ=RTC
X PROPTS=TSMevmjsunpxy
X EPOCH=2000
X NSTEP=1
X
X OBJX=Austin
X OBJY=Juno
X
X As another common example, this ephem.cfg creates an essentially free-
X running real-time screen based on the computer clock:
X
X UT=Now
X LONG=90:10:8
X LAT=40:50:20
X HEIGHT=800
X TEMP=50
X PRES=29
X STPSZ=RTC
X PROPTS=TSMevmjsunp
X NSTEP=9999999
X EPOCH=Eod
X PAUSE=30
X
X
X 6. Menu options
X
X When you select "Menu" you can change among the three styles of bottom
X screens. There are also two options that can be set from the Menu quick-
X choice menu. These options toggle when picked and retain their values so
X they need only be changed when desired.
X
X 6.1. Adaptive vs. Standard hzn
X
X This selects the horizon refraction displacement algorithm used by the
X Rise/Set menu. "Adaptive" uses the local atmospheric conditions known to
X ephem and matches the Planet Info times nicely. "Standard" uses the
X "accepted nominal" horizon refraction value of 32 arc minutes and usually
X agrees, to a minute or so, with published tables.
X
X
X
X
X
X
X
X
X
X
X - 13 -
X
X
X 6.2. Geocentric vs. Topocentric
X
X This selects the vantage point for the Separation menu. "Geocentric"
X ignores local conditions and gives the separation as seen from Earth
X center. "Topocentric" uses the local conditions known to ephem. They are
X particularly critical for lunar occultations, but the effect can be
X significant for the planets.
X
X Note that searching over a period that will include the rise or set times
X of either object is generally better performed from the geocentric
X viewpoint. The refraction effect of the topocentric viewpoint causes many
X arcminutes of rapid whiplash displacement as the objects rise and set that
X overlays the smooth celestial motion of the objects. This rapid position
X variation can confuse the solver algorithms that expect fairly smooth
X functions.
X
X 7. User Defined Objects: X and Y
X
X You may specify one or two extra objects for ephem to use. The objects may
X be defined in four different ways: fixed celestial sphere coordinates, or
X heliocentric elliptical, hyperbolic or parabolic orbital elements.
X Elliptical elements are typically useful for periodic comets or asteroids,
X and hyperbolic and parabolic elements are for nonrecurring solar system
X interlopers such as aperiodic comets.
X
X The parameters for each type of object are stored separately, so you may
X switch between types of objects without losing parameters.
X
X 7.1. Controlling Object-X or Y Operation
X
X To control the type and the corresponding details for object X or Y,
X select the corresponding row near the bottom. (Remember that typing the
X character "x" or "y" is a shorthand way to move to the bottom rows.) It
X will bring up a quick-choice menu as follows:
X
X Select: Fixed, Elliptical, Hyperbolic, Parabolic, Lookup, On
X
X
X When you first enter the quick-choice menu the cursor will start out
X positioned at the field for the current type of object. The first four
X selections allow you to enter or review the various parameters required to
X define an object's position of the respective type, one parameter at a
X time.
X
X You set the current object type and begin to view its parameters by
X positioning the cursor over the type and pressing RETURN. The prompt for
X each item includes a short description, the units to use, and its current
X setting is shown in parentheses. To leave the item unchanged and go to the
X next item, type RETURN. If you do not wish to change or see any more
X items about the object then type "q" and you will return immediately to
X the object-X quick-choice menu.
X
X You exit the quick-choice menu by typing "q" while over any field or
X RETURN while over On or Off, as described in a later section.
X
X
X
X
X
X
X
X
X
X - 14 -
X
X
X As with all dates throughout ephem, the dates for the epochs of perihelion
X and reference epochs may be entered in month/day/year or decimal year
X formats, and the day may be entered as a real number (see the section on
X Date and Time Formats). All dates given for comet parameters are always
X in UT.
X
X 7.1.1. Fixed
X
X This selection will present a series of six prompts to define a fixed
X object. The prompts are the name, RA, Dec, magnitude, the reference epoch
X for the coordinates and the angular size in arc seconds.
X
X 7.1.2. Elliptical
X
X This will begin a series of 13 prompts asking for a name and the
X parameters that define a heliocentric elliptic orbit and the coefficients
X for either of two magnitude models. These elements are the same ones
X often listed in the Astronomical Almanac. The elements are, in order:
X
X i = inclination, degrees
X O = longitude of ascending node, degrees
X o = argument of perihelion, degrees
X a = mean distance (aka semi-major axis), AU
X n = daily motion, degrees per day
X e = eccentricity
X M = mean anomaly (ie, degrees from perihelion)
X E = epoch date (ie, time of M)
X D = the equinox year (ie, time of i/O/o)
X g/k or H/G = either of two magnitude models; see below
X s = angular size at 1 AU, arc seconds
X
X
X You might have other parameters available that can be converted into
X these. The following relationships might be useful:
X
X P = sqrt(a*a*a)
X p = O + o
X n = 360/days_per_year/P ~ 0.98563/P
X T = E - M/n
X q = a*(1-e)
X where
X P = the orbital period, years;
X p = longitude of perihelion, degrees
X T = epoch of perihelion (add multiples of P for desired range)
X q = perihelion distance, AU
X
X Note that if you know T you can then set E = T and M = 0.
X
X 7.1.3. Hyperbolic
X
X This will begin a series of 11 prompts asking for a name and the
X parameters that define a heliocentric hyperbolic orbit and the magnitude
X model coefficients. These orbital parameters are, in order:
X
X
X
X
X
X
X
X
X
X
X - 15 -
X
X
X
X T = epoch of perihelion
X i = inclination, degrees
X O = longitude of ascending node, degrees
X o = argument of perihelion, degrees
X e = eccentricity,
X q = perihelion distance, AU
X D = the equinox year (ie, time of i/O/o).
X g/k = magnitude model
X s = angular size at 1 AU, arc seconds
X
X As with elliptical elements, other parameters might be available. The
X relationships are generally the same, except for:
X
X q = a*(e-1)
X
X
X 7.1.4. Parabolic
X
X This will begin a series of 10 prompts asking for a name and the
X parameters that define a heliocentric parabolic orbit and the magnitude
X model coefficients. These orbital parameters are, in order:
X
X T = epoch of perihelion
X i = inclination, degrees
X o = argument of perihelion, degrees
X q = perihelion distance, AU
X O = longitude of ascending node, degrees
X D = the equinox year (ie, time of i/O/o).
X g/k = magnitude model
X s = angular size at 1 AU, arc seconds
X
X
X 7.1.5. Lookup
X
X This option displays the name of each object in the database file. Move
X around the list (using the usual hjkl or arrow keys) and type RETURN to
X select an object. The cursor wraps around all edges. If there is more
X than one page of entries, you may view the next or previous pages by
X typing "n" or "p", respectively. Typing "q" will exit the lookup function
X with no net effect.
X
X If successful, the cursor will move to the type of the new object and it
X becomes the current type.
X
X 7.1.6. On or Off
X
X The last selection on the right toggles the calculations for the object On
X and Off. It toggles when selected with RETURN and then immediately exits
X the quick-choice menu back to the main menu. If calculations become On,
X then they will be performed for the current type of object; if they become
X Off the object-X or Y row of information will be erased.
X
X
X
X
X
X
X
X
END_OF_FILE
if test 41589 -ne `wc -c <'Man.txt.a'`; then
echo shar: \"'Man.txt.a'\" unpacked with wrong size!
fi
# end of 'Man.txt.a'
fi
if [ -f Man.txt.b ]
then
echo adding Man.txt.a to Man.txt.b to form Man.txt
cat Man.txt.a Man.txt.b > Man.txt
echo removing Man.txt.a and Man.txt.b
rm Man.txt.a Man.txt.b
fi
if test -f 'riset_c.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'riset_c.c'\"
else
echo shar: Extracting \"'riset_c.c'\" \(8283 characters\)
sed "s/^X//" >'riset_c.c' <<'END_OF_FILE'
X/* find rise and set circumstances, ie, riset_cir() and related functions. */
X
X#include <stdio.h>
X#include <math.h>
X#include "astro.h"
X#include "circum.h"
X#include "screen.h" /* just for SUN and MOON */
X
X#define TRACE(x) {FILE *fp = fopen("trace","a"); fprintf x; fclose(fp);}
X
X#define STDREF degrad(34./60.) /* nominal horizon refraction amount */
X#define TWIREF degrad(18.) /* twilight horizon displacement */
X#define TMACC (15./3600.) /* convergence accuracy, hours */
X
X/* find where and when a body, p, will rise and set and
X * it's transit circumstances. all times are local, angles rads e of n.
X * return 0 if just returned same stuff as previous call, else 1 if new.
X * status is set from the RS_* #defines in circum.h.
X * also used to find astro twilight by calling with hzn TWILIGHT.
X */
Xriset_cir (p, np, force, hzn, ltr, lts, ltt, azr, azs, altt, status)
Xint p; /* one of the body defines in astro.h or screen.h */
XNow *np;
Xint force; /* set !=0 to force computations */
Xint hzn; /* STDHZN or ADPHZN or TWILIGHT */
Xdouble *ltr, *lts; /* local rise and set times */
Xdouble *ltt; /* local transit time */
Xdouble *azr, *azs; /* local rise and set azimuths, rads e of n */
Xdouble *altt; /* local altitude at transit */
Xint *status; /* one or more of the RS_* defines */
X{
X typedef struct {
X Now l_now;
X double l_ltr, l_lts, l_ltt, l_azr, l_azs, l_altt;
X int l_hzn;
X int l_status;
X } Last;
X /* must be in same order as the astro.h/screen.h #define's */
X static Last last[NOBJ] = {
X {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD},
X {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD}, {NOMJD}
X };
X Last *lp;
X int new;
X
X lp = last + p;
X if (!force && same_cir (np, &lp->l_now) && same_lday (np, &lp->l_now)
X && lp->l_hzn == hzn) {
X *ltr = lp->l_ltr;
X *lts = lp->l_lts;
X *ltt = lp->l_ltt;
X *azr = lp->l_azr;
X *azs = lp->l_azs;
X *altt = lp->l_altt;
X *status = lp->l_status;
X new = 0;
X } else {
X *status = 0;
X iterative_riset (p, np, hzn, ltr, lts, ltt, azr, azs, altt, status);
X lp->l_ltr = *ltr;
X lp->l_lts = *lts;
X lp->l_ltt = *ltt;
X lp->l_azr = *azr;
X lp->l_azs = *azs;
X lp->l_altt = *altt;
X lp->l_status = *status;
X lp->l_hzn = hzn;
X lp->l_now = *np;
X new = 1;
X }
X return (new);
X}
X
Xstatic
Xiterative_riset (p, np, hzn, ltr, lts, ltt, azr, azs, altt, status)
Xint p;
XNow *np;
Xint hzn;
Xdouble *ltr, *lts, *ltt; /* local times of rise, set and transit */
Xdouble *azr, *azs, *altt;/* local azimuths of rise, set and transit altitude */
Xint *status;
X{
X#define MAXPASSES 6
X double lstr, lsts, lstt; /* local sidereal times of rising/setting */
X double mjd0; /* mjd estimates of rise/set event */
X double lnoon; /* mjd of local noon */
X double x; /* discarded tmp value */
X Now n; /* just used to call now_lst() */
X double lst; /* lst at local noon */
X double diff, lastdiff; /* iterative improvement to mjd0 */
X int pass;
X int rss;
X
X /* first approximation is to find rise/set times of a fixed object
X * in its position at local noon.
X */
X lnoon = mjd_day(mjd - tz/24.0) + (12.0 + tz)/24.0; /*mjd of local noon*/
X n.n_mjd = lnoon;
X n.n_lng = lng;
X now_lst (&n, &lst); /* lst at local noon */
X mjd0 = lnoon;
X stationary_riset (p,mjd0,np,hzn,&lstr,&lsts,&lstt,&x,&x,&x,&rss);
X chkrss:
X switch (rss) {
X case 0: break;
X case 1: *status = RS_NEVERUP; return;
X case -1: *status = RS_CIRCUMPOLAR; goto transit;
X default: *status = RS_ERROR; return;
X }
X
X /* find a better approximation to the rising circumstances based on
X * more passes, each using a "fixed" object at the location at
X * previous approximation of the rise time.
X */
X lastdiff = 1000.0;
X for (pass = 1; pass < MAXPASSES; pass++) {
X diff = (lstr - lst)*SIDRATE; /* next guess at rise time wrt noon */
X if (diff > 12.0)
X diff -= 24.0*SIDRATE; /* not tomorrow, today */
X else if (diff < -12.0)
X diff += 24.0*SIDRATE; /* not yesterday, today */
X mjd0 = lnoon + diff/24.0; /* next guess at mjd of rise */
X stationary_riset (p,mjd0,np,hzn,&lstr,&x,&x,azr,&x,&x,&rss);
X if (rss != 0) goto chkrss;
X if (fabs (diff - lastdiff) < TMACC)
X break;
X lastdiff = diff;
X }
X if (pass == MAXPASSES)
X *status |= RS_NORISE; /* didn't converge - no rise today */
X else {
X *ltr = 12.0 + diff;
X if (p != MOON &&
X (*ltr <= 24.0*(1.0-SIDRATE) || *ltr >= 24.0*SIDRATE))
X *status |= RS_2RISES;
X }
X
X /* find a better approximation to the setting circumstances based on
X * more passes, each using a "fixed" object at the location at
X * previous approximation of the set time.
X */
X lastdiff = 1000.0;
X for (pass = 1; pass < MAXPASSES; pass++) {
X diff = (lsts - lst)*SIDRATE; /* next guess at set time wrt noon */
X if (diff > 12.0)
X diff -= 24.0*SIDRATE; /* not tomorrow, today */
X else if (diff < -12.0)
X diff += 24.0*SIDRATE; /* not yesterday, today */
X mjd0 = lnoon + diff/24.0; /* next guess at mjd of set */
X stationary_riset (p,mjd0,np,hzn,&x,&lsts,&x,&x,azs,&x,&rss);
X if (rss != 0) goto chkrss;
X if (fabs (diff - lastdiff) < TMACC)
X break;
X lastdiff = diff;
X }
X if (pass == MAXPASSES)
X *status |= RS_NOSET; /* didn't converge - no set today */
X else {
X *lts = 12.0 + diff;
X if (p != MOON &&
X (*lts <= 24.0*(1.0-SIDRATE) || *lts >= 24.0*SIDRATE))
X *status |= RS_2SETS;
X }
X
X transit:
X /* find a better approximation to the transit circumstances based on
X * more passes, each using a "fixed" object at the location at
X * previous approximation of the transit time.
X */
X lastdiff = 1000.0;
X for (pass = 1; pass < MAXPASSES; pass++) {
X diff = (lstt - lst)*SIDRATE; /*next guess at transit time wrt noon*/
X if (diff > 12.0)
X diff -= 24.0*SIDRATE; /* not tomorrow, today */
X else if (diff < -12.0)
X diff += 24.0*SIDRATE; /* not yesterday, today */
X mjd0 = lnoon + diff/24.0; /* next guess at mjd of transit */
X stationary_riset (p,mjd0,np,hzn,&x,&x,&lstt,&x,&x,altt,&rss);
X if (fabs (diff - lastdiff) < TMACC)
X break;
X lastdiff = diff;
X }
X if (pass == MAXPASSES)
X *status |= RS_NOTRANS; /* didn't converge - no transit today */
X else {
X *ltt = 12.0 + diff;
X if (p != MOON &&
X (*ltt <= 24.0*(1.0-SIDRATE) || *ltt >= 24.0*SIDRATE))
X *status |= RS_2TRANS;
X }
X}
X
Xstatic
Xstationary_riset (p, mjd0, np, hzn, lstr, lsts, lstt, azr, azs, altt, status)
Xint p;
Xdouble mjd0;
XNow *np;
Xint hzn;
Xdouble *lstr, *lsts, *lstt;
Xdouble *azr, *azs, *altt;
Xint *status;
X{
X extern void bye();
X double dis;
X Now n;
X Sky s;
X
X /* find object p's topocentric ra/dec at mjd0
X * (this must include parallax)
X */
X n = *np;
X n.n_mjd = mjd0;
X (void) body_cir (p, 0.0, &n, &s);
X if (epoch != EOD)
X precess (epoch, mjd0, &s.s_ra, &s.s_dec);
X if (s.s_edist > 0) {
X /* parallax, if we can */
X double ehp, lst, ha;
X if (p == MOON)
X ehp = asin (6378.14/s.s_edist);
X else
X ehp = (2.*6378./146e6)/s.s_edist;
X now_lst (&n, &lst);
X ha = hrrad(lst) - s.s_ra;
X ta_par (ha, s.s_dec, lat, height, ehp, &ha, &s.s_dec);
X s.s_ra = hrrad(lst) - ha;
X range (&s.s_ra, 2*PI);
X }
X
X switch (hzn) {
X case STDHZN:
X /* nominal atmospheric refraction.
X * then add nominal moon or sun semi-diameter, as appropriate.
X * other objects assumes to be negligibly small.
X */
X dis = STDREF;
X if (p == MOON || p == SUN)
X dis += degrad (32./60./2.);
X break;
X case TWILIGHT:
X if (p != SUN) {
X f_msg ("Non-sun twilight bug!");
X bye();
X }
X dis = TWIREF;
X break;
X case ADPHZN:
X /* adaptive includes actual refraction conditions and also
X * includes object's semi-diameter.
X */
X unrefract (pressure, temp, 0.0, &dis);
X dis = -dis;
X dis += degrad(s.s_size/3600./2.0);
X break;
X }
X
X riset (s.s_ra, s.s_dec, lat, dis, lstr, lsts, azr, azs, status);
X transit (s.s_ra, s.s_dec, np, lstt, altt);
X}
X
X
X/* find when and how hi object at (r,d) is when it transits. */
Xstatic
Xtransit (r, d, np, lstt, altt)
Xdouble r, d; /* ra and dec, rads */
XNow *np; /* for refraction info */
Xdouble *lstt; /* local sidereal time of transit */
Xdouble *altt; /* local, refracted, altitude at time of transit */
X{
X *lstt = radhr(r);
X *altt = PI/2 - lat + d;
X if (*altt > PI/2)
X *altt = PI - *altt;
X refract (pressure, temp, *altt, altt);
X}
END_OF_FILE
if test 8283 -ne `wc -c <'riset_c.c'`; then
echo shar: \"'riset_c.c'\" unpacked with wrong size!
fi
# end of 'riset_c.c'
fi
echo shar: End of archive 1 \(of 9\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 9 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...