A Pocket Computer Survey Program

Pocket Computers, programmable in BASIC have been available for at least 6 years, the most common models being by CASIO or SHARP. During the 1986 and 1987 Dachstein expeditions we were fortunate enough to have models by both manufacturers available and I was able to develop a simple BASIC program to assist us in processing survey data. A slightly enhanced version of which is presented in this article.

BASIC listing

20  I$="EAST="
30  J$="NORTH="
40  K$="'ELEV="
50  L$="PLAN="
140 S=S+1
150 Z$=STR$ (S)
160 "STN "+Z$
180 PRINT "TO ";Z$
220 D=D+B
230 V=V+C
240 H=H+T*SIN(V)
250 P=T*COS(V)
260 N=N+P*COS(V)
270 E=E+P*SIN(D)
280 PRINT Z$,I$
290 PRINT USING "£££££.£££";E
300 PRINT Z$,J$
310 PRINT USING "£££££.£££";N
320 PRINT Z$,K$
330 PRINT USING "£££££.£££";H
340 PRINT Z$,L$
350 PRINT USING "£££££.£££";P
360 GOTO 140

The program as presented will run on a SHARP model PC-1245 and I presume will run on all subsequent SHARP models without modification. The program will also run on CASIO models (which have a better version of BASIC) after some minor modifications to the PRINT and PRINT USING statements.


1) The program requires the user to enter any offsets that are known for the survey instruments following calibration. The offsets can then be applied to all instrument readings.

2) Secondly, details of the starting station from which the current batch of data has been taken is requested. The user is required to enter the number of that station (zero for first set of data), the Northing and Easting offsets (it is common practice to use l000m or l0000m for nation zero to assist in plotting the survey), and the elevation (typically zero or the known elevation of an entrance).

3) The program will then prompt the user to enter instrument and tape measurements (in degrees and metres) to the next station. NOTE that only the forward reading method is supported although the program could be modified quite easily to accept leap-frog readings.

4) After processing the program will display the number of the station for which it is about to give information followed by the Easting, Northing and Elevation which the user should record against the station number.

5) It also gives a plan distance from the previous station. This is required when producing extended elevations which are the moat popular form of survey presentation for vertical systems. (This is a modification introduced since the Austrian expeditions).

6) The program finally loops back, increments the station counter by one and then prompts for data for the next survey leg.

Further Notes

(a) When dealing with vertical legs you should enter a compass bearing of zero, clino reading of +90 or -90 degrees and a slope distance equivalent to the change in elevation (ie. pitch length).

(b) If you have just returned from a fresh surveying trip, with data to be tagged onto a previous set, simply run the program from the beginning and enter details of the furthest station previously reached (ie. station number, Northing, Easting and Elevation) and continue from there.

(c) The same technique can be employed when a mistake has been made or suspected. Simply re-run the program, enter details of the last reliable station and continue.

(d) In order to process data for side passages it will also be necessary to re-run the program and enter details of the station from which you have branched, however in order to receive the correct prompts for subsequent stations it is necessary to "fiddle" the station start number and enter it as one less than the first new station. For example if you have branched from station 37 to station 82, then 83, 84 etc. re-run the program, enter the start station as 81, (82-1) and the co-ordinates of station 37, then continue.

(e) Because it may be necessary to re-start the program in this way many times during the development of a survey, all co-ordinates are output to three decimal places. I am not suggesting that anyone wishes to plot stations to the nearest millimetre but to keep cumulative errors to a minimum it is worth recording and re-entering co-ordinates to this level.

(f) This program has been largely developed in-the-field and used by several cavers without particular problems (apart from the effects of alcohol and a noisy bar). I believe it scores well over similar programs I have seen for programmable calculators as it allows for reasonable prompts and can be readily tailored to incorporate further features such as accumulated length, distance from known point within another system etc. Originally I included more detailed prompts but this only proved to be irritating after the first couple of minutes use.

(g) One major drawback to the programing of these pocket computers is that of memory. At present the affordable models simply do not have enough RAM to be able to store the readings for more than a few survey legs, hence the approach that I have adopted. A secondary drawback is that the BASIC's available only allow for a single character variable name which makes it more difficult to follow the program. For this reason I have listed all the variables used and indicated by a capital letter the mnemonic

B  - compass (B)earing offset
C  - (C)lino offset
D  - compass reading in (D)egrees
E  - (E)asting
H  - (H)eight
I$ - fixed string
J$ - fixed string
K$ - fixed string
L$ - fixed string
N  - (N)orthing
P  - (P)lan distance
S  - (S)tation number
T  - slope distance, (T)ape
V  - clino reading, (V)ertical degrees
Z$ - General purpose string

Unused variables :- A,F,G,M,O,Q,R,U,W,X,Y

Chris Fry