HP-41CX sun position program.
#1

Hi. I'm looking for a program that can give me the position of the sun in RA and DEC for a HP-41CX with the curent date and time of the calculator.


Or at least an algorithm that will help me do the program... I just buy a 11" celestron for school with a "GO TO" for 40 000 objects in the sky BUT the sun has not been program and it is often difficult to point correctly the sun. But with RA and DEC from my CX i will just enter them and GOTO!


Thanks
Michel Beaulieu
Canada

#2

Michel --

I have a program written by Tom Sherman in 1986, which he sent to me within the past several years. It requires an HP-41 Navigation Pac and a 41CX or 41C/CV with Time Module. (A 41C will also require a Memory Module or Quad Memory Module.)

Given the latitude and longitude of a location, plus the date and time from the clock, it will calculate the angles of altitude and azimuth for the sun, the moon, four visible planets, and many navigational stars.

I'd like to make a few refinements to the program, but have not yet done so. I have written the program to magnetic cards.

-- KS

#3

I know it may seem redundant, however one must be extremely careful when viewing the sun. You MUST have a solar filter that is compatable with your telescope!

tm

#4

Here is a BASIC program which will give the RA and DEC of the Sun to very high accuracy (a few seconds of arc) given year, date, and time (hours and minutes) as input. (Note, there are some extra variables printed in this version - helpful for debugging and generally checking what's happening). Note that the parallax of the Sun (which can be up to almost 10 arcseconds) is ignored. The RA, DEC are with respect to the center of the Earth. RA and DEC are in fractional hours and degrees - I'm not sure what your telescope wants.

10 DEFDBL A-H,J-Z
20 PI = 3.14159265#: TWOPI = 2# * PI: CONV = TWOPI / 360#
30 YEAR = 2000: MONTH = 8: DAY = 22: HOUR = 2: MIN = 0

get the time & date from the calculator instead

40 UTC = (TWOPI * (60# * HOUR + MIN)) / 1440#
50 DIM NDAY(12)
60 DATA 0,31,59,90,120,151,181,212,243,273,304,334
70 FOR I = 1 TO 12
80 READ NDAY(I)
90 NEXT I
100 YEARM = YEAR - 1900#
110 KDAY = INT((YEARM - 1#) / 4#)
120 JULDAY = 2415019.5# + YEARM*365# + KDAY
130 JULDAY = JULDAY + NDAY(MONTH) + DAY
140 IF(YEARM/4# - INT(YEARM/4#)) > .2 THEN GOTO 160
150 IF(MONTH > 2) THEN JULDAY = JULDAY + 1#
160 CENTURY = ( JULDAY - 2451545# ) / 36525#
170 STM = 24110.55# + CENTURY* (8640184.812866# + .093104#*CENTURY)
180 STM = STM/86400# - INT(STM/86400#)
190 STM = 2# * PI * STM: PRINT JULDAY,STM*12/PI
200 DAYS = JULDAY - 2451545# + (UTC/TWOPI)
210 SOLLON = 280.46# + .9856474# * DAYS
220 SOLLON = SOLLON - 360# * SGN(SOLLON)*INT(SOLLON/360#)
230 IF(SOLLON < 0) THEN SOLLON = SOLLON + 360#
240 SOLANOM = 357.528# + .9856003# * DAYS
250 SOLANOM = SOLANOM * CONV
260 SOLANOM = SOLANOM + TWOPI * SGN(SOLANOM)*INT(SOLANOM/TWOPI)
270 IF(SOLANOM < 0) THEN SOLANOM = SOLANOM + TWOPI
280 ECLLON = SOLLON + 1.915# * SIN(SOLANOM) + .02# * SIN(2#*SOLANOM)
290 ECLLON = ECLLON * CONV
300 ECLLON = ECLLON + TWOPI * SGN(ECLLON)*INT(ECLLON/TWOPI)
310 QUADRANT = ECLLON / (PI/2)
320 IQUAD = 1 + INT(QUADRANT)
325 PRINT ECLLON,QUADRANT,IQUAD
330 OBLIQ = 23.439# - .0000004# * DAYS
340 OBLIQ = OBLIQ * CONV
350 RA = ATN( COS(OBLIQ) * TAN(ECLLON) )
360 IF IQUAD=2 THEN RA = RA + PI
370 IF IQUAD=3 THEN RA = RA + PI
380 IF IQUAD=4 THEN RA = RA + TWOPI
390 ARG = SIN(OBLIQ) * SIN(ECLLON)
400 DEC = ATN(ARG/SQR(1-ARG*ARG)): PRINT RA*12/PI,DEC/CONV

I wrote this as part of the SUNMOON program which was published with my article on calibrating antennas by observing the Sun or Moon in the ARRL UHF/VHF Handbook. It uses a formula from the "American Ephemeris and Nautical Almanac" (published by the US Navy).

If you have questions, you can e-mail me directly.

Dave W8MIF

#5

I have a Meade ETX90 and the SUN is not in the controller either, and safety is the main reason for that. The trick I know that has been used is to define a planetary object (if that is possible) that has the same orbit as the earth, but exactly opposite of the sun.

Be very very careful with solar watching. Use a good solar filter!

#6

Hello Michel!

Something to try!
I wrote this program for my 41cv.

Good luck!

Wilhelm Loidl

p.s.: sorry for the format!

LBL "SUN"
FIX 04
CF 01
XEQ 07
LBL 24
XEQ 08
CLA
"? GMT HR.MIN"
PROMPT
HR
LBL 15
15
*
STO 02
STO 05
RCL 03
+
365.25
/
118.1
RCL 04
968
/
-
+
.2
P-R
9.58
-
*
+
RCL 04
427
/
RCL 04
COS
-
8531.5
-
360
/
CHS
X<>Y
-1
P-R
RDN
P-R
R^
R-P
RDN
X<>Y
STO 07
ASIN
STO 06
RDN
-
ST+ 05
RCL 05
RCL 00
-
RCL 06
COS
P-R
RCL 01
STO 06
X<>Y
P-R
X<> 06
RCL 07
P-R
X<> 06
+
ASIN
X<> 06
-
R-P
RDN
180
+
STO 08
FS? 01
RTN
CLA
"HRZ "
ARCL X
AVIEW
PROMPT
CLA
"VRT "
ARCL 06
AVIEW
PROMPT
GTO 24
RTN
LBL 07
"LAT ?"
CLA
"? LAT N+ DEG"
PROMPT
STO 01
"? LNG W+ DEG"
PROMPT
STO 00
RTN
LBL 08
CLA
"? MM.DDYYYY"
PROMPT
INT
STO 06
LASTX
FRC
100
*
INT
STO 03
LASTX
FRC
1 E4
*
X<> Z
3056
%
INT
ST+ 03
R^
STO 04
RCL 06
3
X>Y?
1
RCL 04
4
/
FRC
+
1
X<>Y
X=Y?
2
RCL 04
7
-
RCL 03
365.25
/
+
STO 06
20
*
STO 04
SIN
4
*
50941
+
RCL 06
7
*
+
896
/
-
ST- 03
360
ST* 03
RTN

#7

Thanks for the BASIC and the HP-41 program, i'm just entering them in my 41c and my 75c.

Michel

#8

Hi,
You can use the program listed in the HP-41 software library:
"Astronomical Ephemeris"
Regards
JM

#9

Like this?


001 *LBL "SUN" 
002 FIX 04
003 CF 01
004 XEQ 07
005 LBL 24
006 XEQ 08
007 CLA
008 '? GMT HR.MIN'
009 PROMPT
010 HR
011 LBL 15
012 15
013 *
014 STO 02
015 STO 05
016 RCL 03
017 +
018 365.25
019 /
020 118.1
021 RCL 04
022 968
023 /
024 -
025 +
026 .2
027 P-R
028 9.58
029 -
030 *
031 +
032 RCL 04
033 427
034 /
035 RCL 04
036 COS
037 -
038 8531.5
039 -
040 360
041 /
042 CHS
043 X<>Y
044 -1
045 P-R
046 RDN
047 P-R
048 R^
049 R-P
050 RDN
051 X<>Y
052 STO 07
053 ASIN
054 STO 06
055 RDN
056 -
057 ST+ 05
058 RCL 05
059 RCL 00
060 -
061 RCL 06
062 COS
063 P-R
064 RCL 01
065 STO 06
066 X<>Y
067 P-R
068 X<> 06
069 RCL 07
070 P-R
071 X<> 06
072 +
073 ASIN
074 X<> 06
075 -
076 R-P
077 RDN
078 180
079 +
080 STO 08
081 FS? 01
082 RTN
083 CLA
084 'HRZ '
085 ARCL X
086 AVIEW
087 PROMPT
088 CLA
089 'VRT '
090 ARCL 06
091 AVIEW
092 PROMPT
093 GTO 24
094 RTN
095 LBL 07
096 'LAT ?'
097 CLA
098 '? LAT N+ DEG'
099 PROMPT
100 STO 01
101 '? LNG W+ DEG'
102 PROMPT
103 STO 00
104 RTN
105 LBL 08
106 CLA
107 '? MM.DDYYYY'
108 PROMPT
109 INT
110 STO 06
111 LASTX
112 FRC
113 100
114 *
115 INT
116 STO 03
117 LASTX
118 FRC
119 1 E4
120 *
121 X<> Z
122 3056
123 %
124 INT
125 ST+ 03
126 R^
127 STO 04
128 RCL 06
129 3
130 X>Y?
131 1
132 RCL 04
133 4
134 /
135 FRC
136 +
137 1
138 X<>Y
139 X=Y?
140 2
141 RCL 04
142 7
143 -
144 RCL 03
145 365.25
146 /
147 +
148 STO 06
149 20
150 *
151 STO 04
152 SIN
153 4
154 *
155 50941
156 +
157 RCL 06
158 7
159 *
160 +
161 896
162 /
163 -
164 ST- 03
165 360
166 ST* 03
167 RTN
#10

Thanks; with that form i was able to track my error on line 044 -1 i entered 044 - and 045 1. Now the program works great.

By the way, is there a program to convert these coordinate to equatorial one?

Thanks again
Michel

#11

The Sokkia company, a manufacturer of surveying equipment, publishes an annual pocket-sized "Celestial Observation Handbook & Ephemeris" for surveyors. It traditionally included professional-grade HP calculator programs for the 41, 42 and 48 series. I haven't seen the latest editions and don't know if the programs are still there; they were in the 2003 edition.

You can find this at surveying supply stores or www.forestry-suppliers.com if interested. It costs about $8.50.

The Sokkia book and programs were written by Elgin, Knowles & Senne, at http://www.rollanet.org/~eksi/softprod.htm . They apparently still offer the "Astro*Card" for HP48GX.



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 2,788 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  Challenge(?): Intersection curve between two cylinders in a specific position Pier Aiello 15 4,634 09-17-2013, 05:58 PM
Last Post: Pier Aiello
  Operator keys position: why vertical? Alexander Oestert 23 5,262 12-12-2012, 02:39 PM
Last Post: BruceH
  [WP34s] a) Input position and b) units and c) reminder plate Alexander Oestert 11 3,286 10-12-2011, 06:07 PM
Last Post: Dieter
  41CX Startup Program? Egan Ford 12 2,865 10-15-2009, 02:27 AM
Last Post: Christoph Klug
  HP 41CX locked in program mode Steve Leibson 7 2,204 10-03-2009, 12:15 AM
Last Post: Randy
  HP-41 MCODE: Making an MCODE program call another MCODE program Geir Isene 10 2,949 01-13-2008, 05:58 AM
Last Post: Raymond Del Tondo
  HP-12C, Comma in wrong position in dispaly adam 7 2,208 09-08-2006, 02:01 AM
Last Post: Katie Wasserman
  Re: HP-41CX sun position program. Wilhelm Loidl 13 3,047 04-17-2006, 09:09 PM
Last Post: Ed Look
  i lost my program on my 41cx ross denys 9 2,353 12-11-2005, 03:25 AM
Last Post: Garth Wilson

Forum Jump: