Geir Isene's improved version of celestial locator program Message #11 Posted by Karl Schneider on 21 Oct 2010, 3:41 a.m., in response to message #5 by Jeff Kearns
Jeff 
You had found one of the threads regarding Tom Sherman's HP41 celestial locator program, but there was another thread in 2006 in which Tom contributed and Geir posted his improved version of the program:
http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv016.cgi?read=91858#91858
I will copy and paste Geir's version below, together with the "DMD" program he omitted in 2006 (as recently refined by Thomas Klemm), and also including one worthwhile instruction added by me (003 DEG, to ensure that the degree angular mode is set for calculations).
The "DMD" program allows the user to maintain Europeanstyle date mode (dd.mmyyyy), which is initiated by running the Time Module command "DMY" (which sets Flag 31). The Nav Pac subroutine "FA" requires that the input date be formatted USstyle (mm.ddyyyy), as documented on page 41 of the Nav Pac manual.
As a side note, years outside the range 19001999 are displayed on the HP41 using four digits. The full dates look nicer in European format on the HP41's 12character display.
For guidance in usage, please see Geir's description of the features of his program, in the thread of 2006. I'll also note that entry of an arbitrary date and time is of the form <date> ENTER <time>, occupying two stack levels. In the source code listing, "" is the unprintable 'append' character shiftK in ALPHA mode.
The complete, improved program:
001 *LBL "SKY" 051 "LO" 101 GTO 02 151 DATE
002 LBL e 052 XROM "DSPLO" 102 LBL a 152 FS? 31
003 DEG 053 "?" 103 "VENUS" 153 XEQ "DMD"
004 CF 01 054 PROMPT 104 AVIEW 154 STO 30
005 CF 02 055 XROM "*HR" 105 6 155 TIME
006 SF 00 056 STO 08 106 LBL 06 156 LBL 12
007 CLK24 057 LBL E 107 XEQ 01 157 RCL 54
008 "DT+TM=<NOW>" 058 "S,V O,M *,J ,SA" 108 .017 158 HMS
009 CF 22 059 PROMPT 109 + 159 FS? 03
010 PROMPT 060 LBL A 110 STO 34 160 1
011 FC? 22 061 "SUN" 111 XROM "*VENUS" 161 FS? 03
012 GTO 10 062 AVIEW 112 GTO 02 162 HMS+
013 STO 55 063 3 113 LBL b 163 HR
014 X<>Y 064 LBL 03 114 "MARS" 164 RTN
015 FS? 31 065 XEQ 01 115 AVIEW 165 LBL 02
016 XEQ "DMD" 066 .012 116 7 166 RCL 44
017 STO 30 067 + 117 LBL 07 167 RCL 45
018 SF 02 068 STO 34 118 XEQ 01 168 +
019 LBL 10 069 XROM "*SUN" 119 .019 169 RCL 08
020 RCL 54 070 GTO 02 120 + 170 
021 "TZ= " 071 LBL B 121 STO 34 171 RCL 07
022 ARCL X 072 "MOON" 122 XROM "*MARS" 172 RCL 46
023 PROMPT 073 AVIEW 123 GTO 02 173 XROM "*SRT"
024 STO 54 074 4 124 LBL c 174 CF 21
025 "N" 075 LBL 04 125 "JUPITER" 175 BEEP
026 ASTO Y 076 XEQ 01 126 AVIEW 176 FIX 1
027 "SUM.TIME? <" 077 .026 127 8 177 "ALT= "
028 FS? 03 078 + 128 LBL 08 178 ARCL X
029 "Y" 079 STO 34 129 XEQ 01 179 AVIEW
030 FC? 03 080 XROM "*MOON" 130 .02 180 PSE
031 "N" 081 GTO 02 131 + 181 PSE
032 ">" 082 LBL C 132 STO 34 182 "AZI= "
033 CF 23 083 "STAR NO= ?" 133 XROM "*JUPIT" 183 ARCL Y
034 AON 084 PROMPT 134 GTO 02 184 AVIEW
035 PROMPT 085 INT 135 LBL d 185 FC? 01
036 AOFF 086 STO 47 136 "SATURN" 186 STOP
037 FC? 23 087 FIX 0 137 AVIEW 187 SF 01
038 GTO 11 088 "STAR " 138 9 188 GTO IND 56
039 ASTO X 089 ARCL 47 139 LBL 09 189 *LBL "DMD"
040 X NE Y? 090 AVIEW 140 XEQ 01 190 INT
041 SF 03 091 5 141 .024 191 LASTX
042 LBL 11 092 LBL 05 142 + 192 FRC
043 RCL 07 093 XEQ 01 143 STO 34 193 100
044 "LAT" 094 .011 144 XROM "*SATUR" 194 *
045 XROM "DSPL" 095 + 145 GTO 02 195 INT
046 "?" 096 STO 34 146 LBL 01 196 X<>Y
047 PROMPT 097 RCL 30 147 STO 56 197 LASTX
048 XROM "*HR" 098 XROM "FA" 148 RCL 55 198 FRC
049 STO 07 099 STO 44 149 FS? 02 199 +
050 RCL 08 100 XROM "*STAR" 150 GTO 12 200 100
201 /
202 +
203 END
 KS
Edited: 3 Nov 2010, 12:22 a.m. after one or more responses were posted
