The HP 35s Calculator—A Field Surveyor's Companion: Part 1—Point Storage

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

Note: This article contains many symbols and key representations. It is strongly recommended that the reader view the PDF of the article to see these.

The August 2014 issue of The American Surveyor presented the article Two Nifty Programs that will make your HP 35S Calculator "Cry And Sing!" The article highlights my discontent towards HP’s inadvertent omission of the traditional rectangular/polar conversion keys as well as providing a remedy to address the deficiency. Accepting this enigmatic omission and simply adding it to my list of "product faux pas" (which includes Cajun Style Visine, New Coke, and the sub-prime mortgage) has empowered me to move forward and exploit the true potential of this awesome calculator. The strength of the 35s lies with its ability to digest equations along with its refined keystroke programming architecture. I will present a series of articles that demonstrate how to transform your RPN adding machine into a 400 point COGO-DOZER rivaling the usefulness of commercial data collector/desktop packages. There are very few mathematical challenges that the HP35s cannot devour however one is matrix operations. Matrix logic, more memory, and a key for constructing complex numbers from the stack elements would be welcomed additions to the next generation low-budget, non-graphing RPN calculator.

Laying the Groundwork
The first task at hand is to provide for a data base from which to recall and store points. The 35s has 32K of useable memory. I have found with my complete set of programs installed there is room for about 400 points in variable storage. The 35s has 800 indirect registers that are accessed through the variables I, (I), J,(J). This function is a two level operation that assigns the value stored in variable I or J as the objective register of the (I) or (J) key. For example is the number 1 is stored in the variable I then "recall (I)" will retrieve the data stored in the indirect register 1. Likewise if the number 799 is stored in variable J then "recall (J)" will retrieve the data stored in indirect register 799. So in effect (I) and (J) can by any one of 800 indirect registers identified by the values stored in the variables I or J. We are able to store both northing(y) and easting(x) in a single register as a complex number displayed in rectangular format. This realization expands the opportunities for point storage and is a great feature of the 35s.

There are a few conventions I’ll use to express various programming commands. Keys will be identified with highlights. For example 0 means the zero key and R/S means the run stop key. Multiplication is represented by ×. The variable "x" shall be delineated by italicization. BRS and YLS refer to the blue right shift and yellow left shift keys accordingly. With shifted functions I will show the main key function in brackets and occasionally the shifted function in braces for clarity. For example YLS ENTER {SHOW} refers to the "SHOW" command. Passive equations will be delineated by EQN and quotation marks around the text. Stack registers will be delineated by regx, regy, regz, regt. These can be accessed in programming by keying R in program and equation entry modes. Statistics menus and data are available during programming as well. Access statistical data by keystrokes BRS – {sums}, BRS + {s,}, YLS – {L.R}, and YLS + { x,y }

Table 1: User Instructions (see PDF)

Introduction To RPN Keystroke Programming
RPN keystroke programming is very straight forward and akin to Microsoft Macros. A program is simply a set of instructions comprised of sequential list of keystrokes representing functions, equations, and variables. If you can perform the calculations longhand with the 35s then you can program the 35s to follow the same script. Refer to Chapters 13­15 in the HP 35s User’s Guide for detailed information.

To begin programming let’s start with a clean slate and "clear all" by keying blue right shift (see note above for BRS)  3 to clear all memory. WARNING: This clears everything! Be cautious if you are unsure. Refer to the manual to remove individual items. Open the program mode by keying in BRS R/S {PRGM}. You will be at "PROGRAM TOP". This is a reference point and the beginning of all programs. If you get lost in a program simply key in GTO . . to return back to the program top. Every program begins with a letter label from A-Z. The 35s is limited to 26 programs max however I will demonstrate that certain programs can be embedded in others or referred to as subroutines. This saves on memory and redundant programming. The first keystrokes of every program should be BRS XEQ {LBL} and your letter of choice. I have selected "H" for points for no other reason than "P" was my label for "POLAR". All programs should end with the keystroke YLS XEQ {RTN}. This instruction returns to the program top or runs the next program. We have defined a start, an end, and now we put a bunch of stuff in between. You’ll notice that the listing is sequential and begins with the label at line 001. The 35s automatically prompts for the next line number. Think of this as a sequence number for each step as well as an address for branching. The GTO prompting may become out of sequence when you edit programs. Keep this in mind as a likely error source when dealing with GTO statements (branching and looping). You may have to edit GTO statement destinations along with desired program modifications. Each line generally represents one keystroke, function, command, or value. An exception to this would include active equations by which a seemingly unlimited amount of mathematical operations can be expressed as a single line element. This is a fantastic achievement for RPN keystroke and real thumbs up for HP! Equations can be set as active or passive. This is also a true milestone for the 35s. Flag 10 is the toggle that controls this feature. When flag 10 is clear the equations are active and will be evaluated to a numerical solution. When flag 10 is set the equation is passive whereas its only function is displaying the text of the equation in the X-register. This is demonstrated at line H002 and H003. This can be another source of bugs if overlooked. Simply remember to either set or clear flag 10 when dealing with any equations. Again keep in mind branching from other subroutines may have yield a flag setting contrary to the current operation. The keystrokes to set and clear flag 10 are YLS  {FLAGS} 1 . 0 to set, and YLS  {FLAGS} 2 . 0 to clear. Flag 10 is represented by decimal point and zero. See the user’s guide for detailed information regarding flags.

The Program
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 the PDF

Example Data and Running the Program
(See Table 1: User Instructions on the previous page.) Hopefully this information presented herein is clear and genuinely explanatory. Please do not hesitate to send any comments, concerns, questions, or criticism to rls43185@gmail.com. Point storage and recall is prerequisite to any COGO program. We have created a good foundation to support various routines. Elements of this program will be nested in other routines. The primary function of program "H" is to provide an independent environment to store and view coordinates. The next installment will focus on azimuth traverse and embedded point recall & storage.
 
Since 2012, Jason Foose has s
erved as Arizona’s Mohave County Surveyor. He is licensed in Arizona, Colorado, and Nevada and has enjoyed a full time career in Surveying since 1993. Prior to that he worked part time as a rodman, and full time for a title insurance company running chains of title in the dusty old Victorian courthouse in Medina County, Ohio. He owned and operated a small surveying practice on the Colorado Front Range and accumulated 12 years of private sector experience before accepting a position as a staff surveyor with Mohave County.

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

About the Author

Jason Foose, PS

Jason Foose originally hails from the Connecticut Western Reserve Township 3, range XIV West of Ellicott’s Line Surveyed in 1785 but now resides in Township 21 North, Range 17 West of the Gila & Salt River Base Line and Meridian. He is also the Managing Editor of the magazine.