THE HOUR ANGLE FROM LOCAL MEAN TIME


Disp "M:D:YEAR" is a reminder for the forthcoming prompt (Prompt A,B,C)  that asks for the month, day and year as 2, then 5, and finally 2002. The second prompt asks for the hour, minute and second (UTC) of interest.
You must correct for the desired time zone and for the deviation of your location of interest relative to the start of the appropriate time zone.  Thus, 7.124619445designates 27 min 44 sec west of the start of the MST zone (+7 hr relative to UTC).
The initial output is the LST at the local meridian.
Disp "RTASC" is a reminder for the right ascension of the object of interest.
The final output is the Hour Angle. A positive value indicates that the object of interest has transitted the local meridian.  A negative value indicates the hour angle before the object of interest transits the local meridian.
<= denotes less than or equal to


Disp "M,D,YEAR"
Prompt A,B,C
If A<=2
Then
A+12->A
C-1->C
End
19->D
-13->E
iPart((365.25xC)->F
iPart(((A+1)x30.6001)->G
E+F+G+B+1720994.5->X
X-2451545->S
S/36525->T
6.697374558+(2400.051336xT)+(0.000025862xT2)->V
If V>24
Goto M
If V<0
Goto H
Lbl M
While V>24
V-24->V
End
Lbl H
While V<0
V+24->V
End
Disp "MST"
Prompt O,P,Q
O+P/60+Q/3600->W
W+7->W
(Wx1.0027379094)+V->Z
Z-7.124619445->Y
If Y<0
24+Y->Y
If Y>24
Then
Y-24->Y
End
Fix 2
iPart(Y)->q
Fix 0
Disp "LST:HOUR",q
Fix 2
60xfPart((Y)->A
iPart(A)->q
Fix 0
Disp "MINUTE",q
Fix 2
60xfPart(A)->J
Fix 0
Disp "SECOND",J
Disp "RTASC"
Prompt E,F,G
E+(F/60)+(G/3600)->Q
If Y>Q
Y-Q->G
If Y<Q
Q-Y->G
If Y=Q
G=0
Fix 2
iPart(G->S
60xfPart((G)->I
Fix 0
Disp "HRANG: HOUR",S
Disp "MINUTE",I
Fix 2
60xfPart(I)->J
Fix 0
Disp "SECOND",J
Float


Your comments and suggestions are always welcome: gar8@earthlink.net
13, April 20:0:0 UTC