The American Surveyor

HP 35s Calculator—A Field Surveyor's Companion—Part 2 A Few Inner Workings Leading Up to Traverse

A 113Kb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE

Correction: I presented the article Two Nifty Programs that will make your HP 35S Calculator "Cry And Sing!" in the August 2014 issue of The American Surveyor. I scoured that thing for errors like a polecat in a Piggly Wiggly dumpster. While I’m ecstatic to learn that our readers are getting into the subject matter, I regret to inform you of an oversight on my part. In my "polar to rectangular" conversion example I included an extra  ENTER  keystroke after keying in the distance (magnitude/modulus component) in both samples. This inadvertently places the distance in both Y-reg and X-reg rather than the intended Y-reg=angle X-reg=distance. Special thanks goes out to reader William L. Meagher of WM Surveys, Inc. Ventura, California, for the catch and a toast to our polecat of the month award winner!

The Inner Workings
The development of these programs has been an evolutionary expansion of my personal knowledge regarding programming logic. The components of the traverse routine are among my earliest attempts at keystroke programming and appear rudimentary to me now. The catalyst of improvement is the application of hindsight to foresight; however I have elected to present the programs as originally written while placing the challenge of improvement in the readers’ hands. Please email your suggestions for improvement to rls43185@gmail.com. I will do my best to incorporate your suggestions in print as we progress through the column.

You will need to refer to the August 2014 issue and install the Rectangular and Polar programs. Make sure that you label the "R" and "P" accordingly. Traverse relies on six subroutines or nested programs to function. Rectangular and Polar are two of those.

This Month’s Programs
LBL C manipulates a distance in the Y-reg with an azimuth in the X-reg into a complex number. This program was slightly modified from the work by and shown with permission of Jeremy Dean. Jeremy’s original program can be found at sac-surveyors.org/node/22 and can run as a "stand alone" program. Thanks Jeremy for this great little ditty!

Key in the following instructions beginning with BRS R/S {PRGM} to open program mode. C or BRS R/S {PRGM} will exit program mode.

See PDF

Jeremy’s program is great and I have relied on it for several years without question. I recognized that the program radiated savviness beyond my stratosphere of insight. Revisiting my programs in conjunction with this series yielded a grin anointed with posterior knowledge and an alternative prescription for the same solution as follows:

See PDF

Whereas Jeremy’s original version efficiently follows the syntax and architecture of traditional keystroke programming, the alternate method demonstrates the true power of the HP 35s’ ability to digest complicated equations. This example affords a shift in logic from traditional keystroke step programming to equation based programming. Besides the obvious reduction in programming lines, unlocking the power of this equation logic also patents the opportunity to expand our conventional wisdom beyond the established frontiers of RPN practice. After realizing the "wow" factor of this equation logic, I cut a big ol’ slice of humble pie and understood why a rectangular/polar conversion key may not be such a big deal in the larger world of mathematics and handheld calculators. It took me a while but I finally caught up with HP’s foresight.

Program LBL A is a dependent subroutine utility that manipulates and applies the traverse course to the point coordinates then returns to the traverse program at line T034.

See PDF

The program can be verified by storing the value of 100 in variables “E” and “N”. Key the complex number 100i100 into the stack and ENTER then XEQ R/S (LBL A). The solution in the X-reg should be 200i200. This is simply random data to verify the mechanics of your input. There’s no need to examine why this works at this point.

Program LBL J is a dependent subroutine utility that manipulates a complex number (coordinate pair) into its rectangular components and stores the values for later use.

See PDF

The program can be verified by entering coordinates for a point using program LBL H. The program will recall that point and display the rectangular components of that point in the X-reg and Y-reg accordingly. Again this is simply random data to verify the mechanics of your input.

See PDF

The program can be verified by storing the complex number 99i120 into variable C. Run the program and enter point number 1 at the J? prompt. Press R/S and you should see the point number and the coordinate values in complex format. Press R/S again and the word "NONEXISTENT" should appear. This indicates that the program was correctly entered but LBL T (traverse) has yet to been defined. That’s okay!

This installment’s routines are intermediate building blocks for several programs. The routines that follow will be the actual working programs that produce tangible results. The format of the next few installments will include a programming routine, instructions, and sample data for use. The next installment will focus on the azimuth traverse routine and data entry conventions. Hopefully the information presented herein is clear and genuinely explanatory. Please do not hesitate to send any comments, concerns, questions, or criticism to rls43185@gmail.com.

Since 2012, Jason Foose has served as Arizona’s Mohave County Surveyor. He is licensed in Arizona, Colorado, and Nevada and has been practicing since the Cleveland Browns 33rd anniversary of Superbowl celibacy.

A 113Kb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE

Exit mobile version