EXC/ x<>Rn for stack efficiency

06152017, 09:01 AM
(This post was last modified: 06152017 10:36 AM by Dieter.)
Post: #21




RE: EXC/ x<>Rn for stack efficiency
(06142017 11:31 PM)Matt Agajanian Wrote: Great Circle Navigation This is a classic example for what I said earlier. Try to understand how the program works and recode it. This will for instance show that the complete routine in the first steps (which is called several times as SBR 00) is obsolete since it does a simple d.ms to decimal degrees conversion (e.g. it turns 42°50' into 42,8333°). The 25 and 33 have a dedicated function for this. Regarding the EXC instruction: that's obsolete as well. Take a look at the code. In line 84/85 an inverse cosine is calculated and stored in R2 while the previous content oF R2 is recalled and checked whether its sine is > 0. If not, 360 minus the previous result is returned. You could replace the EXC instruction with the code in my first post, so a literal translation would look this way: Code: ... But this is not required. In RPN this can be done more elegantly since the previous result is still on the stack: Code: ... The complete program can be turned into a more compact HP25/33 version. But I am sure that HP25 great circle programs already exist. ;) Edit: a direct translation of the 100step SR56 program is hard to do in 49 steps. However, if the final 360–x procedure is omitted it will fit. Otherwise a few more steps are required. Edit2: I see the SR56 program calculates the great circle distance in nautical miles which is diplayed in step 62. But what is the angle that is calculated afterwards and returned as the second result? Matt, can you post the instructions and an example for this program? Dieter 

« Next Oldest  Next Newest »

User(s) browsing this thread: