(Comp.sys.handhelds) Item: 3528 by TDSTRONG%MTUS5.cts.mtu.edu at VM1.NoDak.EDU Author: [Tim Strong] Subj: Planetary postions HP48SX Date: Thu Jun 20 1991 Hello, Here is the program I promised about a week ago. It calculates the postions of the planets in the sky. You don't have to know anything about julian days or anything like that; the planet finder invokes them internally. However the functions are available. Simply load the directory into your calculator and press CST. (Incidentally make sure your machine is in DEG mode or your answers will come out in radians). After pressing CST you will get the following options: PLAN This key runs the planet finder. I have tried to make it as user friendly as possible since after a few weeks I'd forget how to use it if it weren't. CONC This key invokes a menu driven astronomical coordinate conversion program. I will describe its use in a few minutes. DMS-> This key takes two coordinates that are on the stack in HH.MMSS or DDD.MMSS format and converts them to decimal. Basically it invokes the built-in HMS-> twice. ->DMS This key does the reverse of the above but also tags the output so you know it's in HH.MMSS form. JULDAY This key finds the julian day for any date. Its input is month on stack level three, day on level two, and year on level 1. deltaD90 This key finds the number of days since the epoch of 1990, which is the epoch the internal coordinates or values for the planets orbit elements are set for. epoch This variable contains the current epoch in which you want the coordinate to be figured. If your star maps are labled epoch 2000 you put 2000 in here. phi This variable contains your local latitude in decimal form. Set it for your viewing location. epsilon This variable will find the obliquity of the eliptic for for the current epoch. [Say THAT five times fast! -jkh] First try PLANETS. A menu across the bottom comes up showing all the planets and you are instructed to "ENTER DATE M DD YYY and select planet". Simply do that (for example if I want to know all about Jupiter tonight I enter 6 20 1991 and then press JUPIT). After ten seconds I get the following display (the Greek letters are spelled out): alpha= 9.0000 delta= 17.4839 rho= 6.0239 tau= .5006 Jupiter theta= 32.6598 F= .9956 m= -1.8574 Alpha is the right ascension; it reads as 9hr 00min 00sec. Delta is the declination which reads as 17deg 48min 39sec. Rho is the number of astronomical seconds. Theta is the angular diameter of the planet (how large it will appear in a telescope) in arcminutes. F is the current phase of the planet, as percent lighted. M is the visible magnitude of the planet. Now the numbers for right ascension and declination should be accurate to within a minute or two (Mercury may be worse). Also the magnitude is probably a bit optimistic. Next press CONCO. If there are less than three items on the stack you will see a menu of conversions and the words "select conversion:". Put the coordinates you want to convert on the the stack in decimal notation (use ->DMS if you want to) and then press the appropriate conversion. If there are three items on the stack the program assumes it has been called by another program. In this case the following arguments should be on the stack: 3: first coordinate 2: second coordinate 1: number of conversion The number of the conversion is simply the number of the conversion you want from the menu numbered left to right. Some facts about the program. 1) Please feel free to modify it in any way. If you find a method that makes more sense, is shorter, faster, or easier to understand, or adds features please post it. 2) The program is quite long 4679.5 bytes. I did that to make it user friendly and because it's my first large program (it's not particularly efficient). The following reference should be cited as I used it heavily in order to find an algorithm to find the values: Practical Astronomy with your Calculator--Peter Duffet Smith 3rd. edition Published by the Cambridge University Press 1988. This book is excellent. It even shows how you can use you calculator to predict and picture a solar eclispe. All the routines shown are algorithms that you work out by hand, writing down intermediate results, but they can be programmed with some work (kinda like I did 8-)) ------------------------------------------------------------------------- __ I__) _ _I _ _ Tim Strong I \ (_I (_I (_I I Michigan Tech. Houghton, Michigan, U.S.A.