[net.micro] astronomical references/algorithms wanted

f.wales@glasgow.UUCP (f.wales) (03/09/84)

For a project, I am currently attempting to program an HP-41CX to compute the
position of any stellar object, or any object in a solar orbit, and I am on
the lookout for any references to efficient algorithms or data packing 
techniques which others performing similar computations may have found
worthwhile -- not necessarily on a 41, but for any computer (or even just
bare algorithms).  I would be extremely grateful of any assistance which
anyone could offer in this regard.
   For what it's worth, count me in a `yes' vote for net.micro.hp41.

				Thanks,
				  RPN OK RULES!,
					Frank Wales (PPC #7931)	/;^)

mar%mit-borax@sri-unix.UUCP (03/18/84)

From:  Mark A. Rosenstein <mar@mit-borax>

I computed the phase of the moon by a fairly simple algorithm:
	A reference handbook lists the lunar month at 2551442.8 seconds.
	Find the number of seconds since an arbitrary time in the past
	(such as midnight Jan 1, 1980).
	Take that time modulo the length of a lunar month.  You now have
	the number of seconds into this month's cycle.  You can then
	check for which quarter you are in.
The following listing uses the fact that Unix remembers dates as the
number of seconds from Jan 1, 1970.
--------------------------------
/* pom.c */
#include <stdio.h>
#define cycle	2251443		      /* length of lunar month */
#define qcycle	(cycle/4)
#define offset  qcycle + 4*86400-400  /* how long til the first full
					 moon after Jan 1, 1970 */

extern long time();
char *quarter[] = {"New Moon", "First Quarter", "Full Moon "Last Quarter"};
long rem, qtr, day, hour, min, sec, instant;

main()
{

	rem = (time(0) + offset)%cycle;
	qtr = rem/qcycle;
	rem = rem%qcycle;
	day = rem/86400;
	rem = rem%86400;
	hour = rem/3600;
	rem = rem%3600;
	min = rem/60;
	sec = rem%60;
	printf(" %s+%dD,%dH,%dM,%dS\n", quarter[qtr], day, hour, min, sec);
}

flinn@seismo.UUCP (E. A. Flinn) (03/19/84)

----

On computing the phase of the moon:  it was said -

>>I computed the phase of the moon by a fairly simple algorithm:
>>A reference handbook lists the lunar month at 2551442.8 seconds.
>>Find the number of seconds since an arbitrary time in the past
>>(such as midnight Jan 1, 1980).
>>Take that time modulo the length of a lunar month.  You now have
>>the number of seconds into this month's cycle.  You can then
>>check for which quarter you are in.

You should be aware that the Moon is perturbed in its orbit by the
gravitational attraction of other bodies in the solar system, and by
the deviations from spherical symmetry of the Sun, Earth, and other
planets.  The length of the synodic month varies a good deal (of
the order of 1% or so), and if you use your algorithm over an interval
of several years you'll begin to get the phases wrong.

		-- Ted Flinn

phil@unisoft.UUCP (Phil Ronzone) (03/20/84)

Want you need is an ephemeris.
Large bookstore carry them (under astrology mostly! not usually atronomy!!).
Good ones give refs/formulas.

gam@proper.UUCP (Gordon Moffett) (03/21/84)

#
"Mathematical Astronomy with a pocket calculator" [sic] by
Aubrey Jones, Halsted Press/John Wiley & Sons (1978).

This is the only book I have found to provide formulas for calculating
positions of planets.  Unfortunately, I find the book tough reading,
mainly because it assumes you are using an HP-25 (or HP-67 or HP-97)
programmable calculator and without an understanding of that
language the examples can be confusing.

Oh, for completeness: ISBN 0 470 26552 3

richard@sequent.UUCP (03/21/84)

I'd appreciate it if someone could help me with the following:

How does on compute what phase the mon will be in for any day of
any year?  I suppose this could be expressed in terms of degrees
since the movement is sinusoidal.  Any help out there?

			from the confused and bleeding fingertips of
				...!sequent!richard

bill@utastro.UUCP (William H. Jefferys) (03/21/84)

> Want you need is an ephemeris.
> Large bookstore carry them (under astrology mostly! not usually atronomy!!).
> Good ones give refs/formulas.

The Astronomical Almanac (Formerly American Ephemeris and Nautical
Almanac) is available from

	Superintendent of Documents
	U. S. Government Printing Office
	Washington DC 20402
-- 

	Bill Jefferys  8-%
	Astronomy Dept, University of Texas, Austin TX 78712   (USnail)
	{ihnp4,kpno,ctvax}!ut-sally!utastro!bill   (uucp)
	utastro!bill@ut-ngp			   (ARPANET)

rck@iham1.UUCP (s dust) (03/22/84)

"Practical Astronomy with Your Calculator"
	by Peter Duffet-Smith
	(Cambridge Press?)

Is another book that contains many astronomical algorithms
in it.  This book doesn't assume any particular calculator.
The algorithms are also quite easy to coerce into your
favorite programming language.

				R. C. Kukuk
				AT&T Bell Labs
				Naperville, Ill.