by Timothy H. Heaton, NSS 15753

The HP-15C is a by 5" by 3" by ¼" calculator that can easily fit in a shirt pocket, but which has extensive capabilities and is widely used by scientists and students. It costs about $100 which includes a large owner's handbook describing in detail how to use the calculator.

Since this program and the storage registers it uses take the full memory
capacity of the calculator, the memory must be precisely allocated.
Type __39__ into the display, then type __f DIM (i)__. Now
type __g P/R__ to put the calculator in program mode, and type __f
PRGM__ to erase any programs already in the memory. Now the
program may be entered into the program memory by typing all the keys
listed in Table 1. After the program is entered,
type __g P/R__ again to put the calculator back in run mode.

The program allows for the coordinates to be converted to any
scale. Type the number you want the distances multiplied by (or
type __1__ if you want the output in the same units as the input) then
type __STO 0__ to store this number in the 0 register.

The program also corrects for true north vs. magnetic north. If magnetic
north is clockwise (right) of true north, type the difference in degrees
into the display. If magnetic north is counterclockwise (left) of true
north, type the difference into the display then type __CHS__ to make
the number negative. Now type __STO 1__ to store this number in the 1
register. If no correction is desired, or if the correction is being made
by the compass, make sure that 0 is stored in the 1 register. (It is
probably best to let the calculator correct for true north rather than the
compass. This way the raw survey data is relative to magnetic north, and a
possible later discovery that the correction factor was inaccurate can be
more easily dealt with.)

Now type __GSB . 3__ to begin a routine that sets the coordinates of
the main buffer to zero; or, if you want the cave map to start at a point
other than zero, type the desired vertical coordinate then type
__ENTER__, type the desired east-west coordinate then type
__ENTER__, type the desired north-south coordinate then type
__ENTER__, type the station number you are starting at, then type
__GSB . 1__ to begin a routine that stores these coordinates in the
main buffer. Also type __f USER__ to avoid having to constantly
use the __f__ key when using the __A__, __B__, __C__,
__D__, and __E__ routine keys.

Now the calculator is ready to convert raw survey data to coordinates that can be plotted on graph paper. It is recommended that the raw survey data (from, to, azimuth, dip, and distance) as well as the coordinates obtained from the calculator (north-south coordinate, east-west coordinate, and vertical coordinate) all be recorded in the notebook along with other information about passage width and height, etc.

The north-south and east-west coordinates will be used for the plan view of the cave. The first survey point will be at coordinates (0,0) or whatever coordinates were stored in the main buffer. Positive numbers for the north-south and east-west coordinates indicate that the point is north or east of the coordinates (0,0) respectively, whereas negative numbers indicate points south and west of (0,0) respectively. The vertical coordinate indicates elevation above (positive) or below (negative) the beginning station or initially entered vertical coordinate.

Plot the first survey station (usually 0,0) on the graph paper then use
the calculator to determine the coordinates of the next survey
station. To do this, type the station number to which you are
surveying then type __ENTER__, type the compass azimuth (in degrees)
then type __ENTER__, type the dip (in degrees, followed by __CHS__
if the slope is downward) then type __ENTER__, type the distance, then
type __A__ to begin the routine. After flashing *running*
for 6 seconds, the station number which the coordinates define will
appear in the display. Type __Rv__ to see the north-south
coordinate, type __Rv__ again to see the east-west coordinate, and
type __Rv__ again to see the vertical coordinate. Additional
typing of __Rv__ will allow these four numbers to be reviewed.

In addition to being displayed, the current station number and its coordinates are stored in the main buffer (see Table 2). When the coordinates of the next station are calculated by repeating the steps in the previous paragraph, the additional distances are added to the previous coordinates to always give the coordinates in relation to point (0,0), not in relation to the previous station. A cave survey with no branches or loops can be plotted by simply repeating the steps in the previous paragraph with each set of survey data until the end of the cave is reached.

The current station number and its coordinates can be recalled to the
display from the main buffer at any time by typing __GSB . 2__. Also,
if a wrong piece of data is entered or if the wrong routine key is
pressed, there is a mistake buffer which contains the coordinates of the
previous station, and the calculator will "back up" to the previous
station when __GSB 3__ is typed. (Additional typing of __GSB 3__
will have no effect.)

If the cave passageway splits, and you survey to the end of one branch
then return to the junction and survey down the other, the coordinates of
the junction point should be stored in the calculator. The program
is designed to store up to five sets of coordinates in buffers 1 through
5, and can store a sixth set in buffer 0 if none of the loop routines are
being used. Just type the buffer number into the display then type
__GSB 1__ to store the contents of the main buffer in the indicated
storage buffer. The station number and coordinates stored will also
be recalled to the display.

When you are finished mapping one branch and want to return to the
junction, type the storage buffer number then __GSB 2__ to replace the
main buffer with the coordinates stored in the indicated buffer. Then
begin mapping down the other branch. The storage buffers keeps the stored
data until it is replaced, so if you forget which buffer contains the
coordinates of the junction, you can keep recalling different storage
buffers until the station number you are looking for appears in the
display.

A simpler way to map a branch with only one survey point on it is to use
the mistake buffer. After reaching the junction, just enter the data on
the single station branch, record its coordinates, then type __GSB 3__
to return to the junction, and continue mapping down the other branch.

One-part loops are where you map all the way around the loop in one direction, clockwise or counterclockwise. This program is designed to average the loop closure error over all the stations in the loop. More correction is made between more distant stations, but all stations receive a minimum amount of correction regardless of their spacing.

When, in the process of mapping the cave, you reach the beginning of a
loop that you want to average the closure error of, type __GSB 0__.
This stores the coordinates of that point in buffer 0 and clears a
register that accumulates the loop distance.

Now go around the loop entering the data as before, except type __B__
instead of __A__ for any set of data that is included in the
loop. When the end of the loop is reached (when you have arrived
back at the loop beginning point), type __C__. This divides the error
in each coordinate by the loop distance and stores and displays the
scaled error and a set of correction factors. The actual (unscaled)
error is stored temporarily in register I.

Now type __0 GSB 2__ to place the correct loop beginning coordinates
in the main buffer, and type in all the loop data a second time typing
__E__ instead of __A__ or __B__ for each set of data that is
included in the loop. All the coordinates produced by the
calculator are now corrected, and when you reach the end of the loop, the
coordinates given for the beginning point should be the same as given
initially (the same as the ones stored in buffer 0).

Since any branches off the loop will need the loop corrected before they
will be accurate, it is best to do them on the second time around (using
routine __A__). If the calculator is used to calculate the
survey-point coordinates for plotting as they are measured in the cave,
however, it may be best to draw in the loop and its branches and correct
the loop later after the loop is completed.

A two-part loop is where, from the beginning point of a loop, mapping is done clockwise and counterclockwise until the two branches meet. The program will average the closure error of such loops as it will with one-part loops, but a few more key steps are necessary.

Type __GSB 0__ when beginning the loop as before, and work around the
loop in either direction using the __B__ routine to the point where
the two halves of the loop meet. Then type __GSB . 0__ to store
the coordinates of that point. Type __0 GSB 2__ to return to the
beginning of the loop, and work around the loop the other way using
routine __B__. When the point where the two halves of the loop meet is
reached from the second route, type __C__ to calculate the loop error
and the correction factors. Type __0 GSB 2__ to return to the
beginning of the loop. Now correct the first half of the loop (the part
you did before keying __GSB . 0__) using the __D__ routine. Type
__0 GSB 2__ to return to the beginning of the loop. Now correct the
second half of the loop (the part you did after keying __GSB . 0)__
using the __E__ routine (see Table 3). The
point where the two halves of the loop meet should now have the same
coordinates when calculated from either direction.

If the calculator displays *error*, there are several ways to track
down the problem. The calculator lists an error number, and the type of
error corresponding to each number is listed on the back of the calculator
and described in the owner's handbook. If an inexecutable step is
encountered while the calculator is doing a routine, it will stop at that
program line. After clearing *error* from the display, type __g
P/R__ to see which program step is causing the problem. Check the key
code in Table 1 to see if the step was properly
entered. If not, erase that step by typing _____ then retype the step
properly. If the step is correct but contains a *GTO* or *GSB*
command, find the corresponding *LBL* number in Table 1 and make sure the label step is correct. If
all else fails, run through the entire program step by step by typing
__SST__ (or __g BST__ to back up) in program mode, and compare the
key code for each program line with Table 1 and
erase and retype any incorrect steps.

It is recommended that users of this program become thoroughly familiar with all of its routines before taking it to a cave and expecting it to run smoothly. Also remember to carry extra batteries. Changing the batteries will not affect the calculator's memory, but dropping it can, so always carry a copy of the program in case it needs to be retyped. It is also recommended that the user either keep the calculator in a zipper pocket or design a shock cord to belay it in case it is dropped or falls out of a pocket.

Cave mapping using the HP-15C can be done with a three-person team with the recorder running the calculator in addition to sketching duties. A preferable system is a four-person team where two people run the compass(es) and tape, a third person runs the calculator and keeps the data book, and a fourth person plots the survey points on graph paper and sketches the cave features.

Timothy H. Heaton: E-mail, Home page, Phone (605) 677-6122, FAX (605) 677-6121