Com-Pac Yacht Owners Association
September 06, 2010, 01:46:34 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the CPYOA Forum!
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Sight Reduction Program  (Read 316 times)
HenryC
2nd Watch Helmsman
*****

Karma: +17/-8
Offline Offline

Posts: 124


« on: January 09, 2010, 08:33:43 AM »

This program (for the Casio fx-7000G programmable graphics calculator) does the sight reduction calculation using the math in the Nautical Almanac (see previous posts).  It's pretty compact code because the Casio only had memory for 26 named variables, one for each letter of the alphabet. This device is now a collector's item, (25 years old!) but the code is easy to read so I have included it here. I have the same code written in RPL as a callable subroutine for HP 28/48 calculators, and I will provide it  for anyone who asks for it.  Unless you program HPs all the time, RPL is impenetrable.


                  "SEXTANT"? => O                           Input Prompts 
                  "GHA"? => G
                  "DEC"? => D
                  "LAT"? => T
                  "LON"? => N   

                  "LHA"                                              Calculate and
                   G+N => L>                                     Output Local Hour Angle

                  "N2PI"? => C                                  Prompt for multiple of 360
                   L+C => L                                       Correct the LHA
 
                  sinD => S                                        Altitude Calculation
                  cosDxcosL => C 
                  SxsinT => X
                  CxcosT => Y
                  sin-1(X+Y) => H       

                  SxcosT => X                                    Azimuth Calculation         
                  CxsinT => Y               
                  (X-Y)/cosH => X                         
                  If X>1 then 1 => X                                       
                  If X<-1 then -1 => X
                  cos-1(X) => A             
                  (360-A) =>  Z             
                  If  L>180 then A => Z

                  "INTERCEPT"                                    Calculate and Output Intercept                                 
                  (O-H)x60 => I>                                 (Positive towards, negative away)
                                                       
                  "AZIMUTH"
                  Z>                                                    Output Azimuth     
« Last Edit: January 09, 2010, 08:58:25 AM by HenryC » Logged
HenryC
2nd Watch Helmsman
*****

Karma: +17/-8
Offline Offline

Posts: 124


« Reply #1 on: January 20, 2010, 06:53:21 AM »

I just sent you a message responding to your question.  Let me know if you don't receive it.
HenryC
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!