JASON's LOW-BUDGET SURVEY-PROGRAMS (C) Copyright 1995 JASON LOOK All rights reserved. These programs are not guaranteed to be free from defects. Use them at your own risk. The author of these programs shall not be held responsible for any loss caused by these programs or their use, incidental or otherwise. Use of these programs constitutes your agreement to accept these terms. This and the files that accompany it are shareware. They may not be sold either by themselves or packaged with another product. However, you may copy these files and give them away provided that no modifications are made to any of these files and that this disclaimer and copyright remain intact and included with the program files. If you like and use these programs, send me twenty-five American dollars and I'll send you a better version of these programs on an IBM format 3 1/2" diskette. Make your check or money order payable to: Jason Look P.O. Box 25535 Honolulu, HI 96825 Please address any comments about this programming to the same person and address. 2 ******************************************************************* JASON's TERSE MANUAL for JASON's LOW-BUDGET SURVEY-PROGRAMS A good user's manual for these programs would be far more difficult for me to write than the programs themselves and it would be equally time consuming. This is why I've only provided this terse manual. Sorry it's not lucid. About these programs: There is nothing fantastic about these programs. There is no excellent interface. They aren't riddled with all sorts of fancy features. There is no hacker level coding here. There is only basic solid solutions to time honored scenarios. In fact I may even be taking a step backwards with the way I've programmed the 48, but what I've created is not too slow or too difficult to use and understand. I bring back the simplicity of an older calculator with the advantage of a big screen display. In addition, because almost everything is a function, you are almost always in stack mode and can therefore use the 48 as a calculator. There is no need to carry a second calculator. If you are a serious surveyor, you had better get the card. This is no substitute. However, these programs solve for some things the card doesn't, and in some cases it solves for some things in an easier manner than the card does. In my limited opinion, I believe my set of programs to be a good augmentation to one of those main-stream cards. ******************************************************************* ******************************************************************* Getting started: I believe that these programs will run in both the SX and GX series. However, I cannot say for sure. Actually, they should even run in the S and G versions provided you have enough memory. Again, I could not say for sure as I no longer have these test vehicles. I've only tested them on the GX. I've provided four files including this one. They are: TERSEMAN.TXT, JASON1, JASON2 and JASON3. TERSEMAN.TXT is this file. JASON1 is for the GX. It requires thirty-something kilobytes to load and at least a couple of kilobytes to run. The difference between this file and JASON2 is that it uses the GX's SORT library routine in the filing utility. The file JASON2 is for the SX with enough RAM. It requires as much as JASON1 but unlike JASON1, it can run in the SX as well as the GX. JASON3 should run in any version of the HP-48 provided there is enough memory. This file does not have the file utility and unless you are fairly acquainted with what I've done, this could be a 3 pain. Anyway, if this is the way you go then this file will leave a small file for you to store and retrieve coordinates in, and it's in the directory you downloaded it as (JASON3). This is very important to know as you have to be in this directory to access it via [STOPT] and [RCLPT]. To get started, follow these instructions. JASON1 - for the GX JASON2 - for the GX or SX with enough free RAM JASON3 - for any of the 48s that have enough free RAM TERSEMAN - this file I. Download the appropriate file to your calculator. I assume that if you were resourceful enough to acquire these files, you should be resourceful enough to figure out how to do this. Otherwise read the chapter in your manual on file transfers and Kermit. II. Now get into the directory you downloaded (should be JASON1, JASON2, or JASON3) . Press [VAR] to check out which key to press. Once you are in this directory, look for the |INSTA| menu key andpress it. The calculator should think for a while and then go off. III. When you power the calculator on, all you need to do is engage the USER mode and you're set. These programs make use of the USER defined keys. They work almost exclusively on this principal. [CST] has been defined as well and so to access your regular custom menu, just disengage the USER defined keys before pressing [CST]. You should be able to run from any normal directory in the 48. The coordinate files accessed by the corresponding programs will be the ones in directory you are currently logged into. Look in the upper left hand corner in the curly brackets to see what directory you're in. Please appreciate this. I have spent a lot of time and effort in perfecting this feature. I have sacrificed speed and resistance to operator errors in doing so. Be weary when changing directories. [CST] is the key to your so called main menu. Press this key to access the programs described later in this file. ******************************************************************* 4 ******************************************************************* Generalities: I. If you don't have any variables anywhere the with same names as the ones placed in the HOME directory by this program, there should be no problem in running these programs in any directory. This program may or may not place the variable CURRENTFILE in whatever directory you are working in. It's not recommended that you use this variable name anywhere. II. Most of the programs requiring an angle or an azimuth take them in D.MS format. The obvious exception is the ->HMS function. Also, when an angle or azimuth is returned, it is also in the D.MS format, the obvious exception being HMS->. III. When a coordinate is asked for, it is to be in the form (North, East) in level 1 of the stack or the North component in level 2 of the stack and the East component in level 1 of the stack. IV. When a distance is called for, it is to be a Horizontal Distance. When a distance is returned from a function, it is also in a Horizontal Distance unless otherwise specified. V. When defining a curve and rotation is important, entering the radius as a negative value will denote a left hand curve and a positive radius denotes a right hand curve. A tip-off to this is the menu key |RD/RO| (Radius/Rotation). VI. When you see the four menu keys |INCR| |STA-| |STA+| |STA->| on the same menu page, their meaning is this. A. |INCR| enters the amount to advance or regress the station solved for with the sub-menu it is in. B. |STA-| solves the current program for the station regressed by the increment entered by |INCR| and started off by |STA->|. C. |STA+| solves the current program for the station advanced by the increment entered by |INCR| and started off by |STA->|. D. |STA->| solves for whatever the program solves for with respect to whatever station is entered by this key. It also initiates the station to be advanced or regressed by prior described menu keys. 5 Example: Say that you were solving for the Superelevation from 3 + 00 to 4 + 00 every twenty-five feet, assuming that you have already set the parameters of the diagram, you could do something like this: 25 |INCR| 300 |STA->| |STA+| |STA+| |STA+| |STA+| VII. The parameters of most of the programs are static variables and remain in force until you change them. Check it out, you don't need to keep on reentering the same setup every time you run these things, just view the setup to verify. Also, there is no particular order in which you need to enter them and you only need to enter the ones you wish to change. VIII. When the menu key |VIEW| is pressed, it reveals the parameters of whatever program sub-menu you are at. IX. Don't use the user flag 2. My programs use it as a red flag and won't run properly if you use it. If it appears when running a program of mine, it means that it bombed out. Either run another program that won't bomb out (VIEW something), or under the |UTIL| menu run |INIT| which will reset your flags and re-initialize the USER defined keys that I programmed. X. Some of the programs in this set of programs will leave the results of whatever was solved for on the top of the stack for possible use elsewhere. Pressing the [ON] button will update the stack display and you will be able to see this. Note: Examples are done with a South oriented azimuth. ******************************************************************* 6 ******************************************************************* The USER defined keys: There are twelve (12) of them that I defined. You may wish to consult your owner's manual if you don't know what I'm talking about. From here on, [<-|] and [|->] means left-shift and right-shift respectively. Buying a keyboard overlay is highly recommended, but cutting up POST-IT notes and pasting them in the appropriate place works well also. I. PRINT MODE is toggled on and off by the first key in the second row. This is [MTH] on GX. When PRINT MODE is on the 48 will send output to the IR port for the IR printer to provide you with an audit trail to check your work. II. FIX is a pain in the butt to get to so I've assigned it to the third key in the fifth row. This is [EEX] on the GX. Enter the number of decimal places you would like the 48 display set at and then press this button. III. RCLPT is assigned to the second button in the second row. This is [PRG] on the GX. This recalls a point to the top of the stack. This is very useful to learn how to use. Enter the number of the desired point and press this button. Note that an elevation is displayed for a recalled point. It is purely for annotation purposes with my programs and can be changed with the STOEL USER defined key. Actually, I made the file format like this so I could swap files with my partner. IV. STOPT is assigned to the second key in the third row. This is [STO] on all of the 48s. This is a very important key to know. If a coordinate (as discussed in generalities) is sitting on the top of stack enter the number of the point you wish to store it as and then press [STO]. It is now stored under that number if all went right. Try recalling it. Example: Say that you wanted to store the coordinate 123N 456E as point number 7, then one way to store this coordinate could be these keystrokes: 123 [ENTER] 456 [ENTER] 7 [STOPT] Say this coordinate is the result of some program that leaves a coordinate as a result on the top of the stack. Then this coordinate is already sitting on top of the stack in the form (123, 456) and to store it as point #7 the following keystrokes should work: 7 [STOPT] Anyway, play with it and figure it out. 7 V. STOEL is assigned to the third key in the third row. This is [EVAL] on the GX. It takes an elevation from level 2 of the stack and the point number in level 1 of the stack and stores it appropriately. VI. [CST] has a little program assigned to it which should be almost invisible to anyone not paying close attention. Use it just like you normally would. It brings out the "main" menu which is described under The Custom Menu. If you have a CST variable and want to access it with [CST] then disable the USER defined keys. VII. Six of the defined keys deal with the H.MS format. [<|] & ( [+] or [-] or [*] or [/] ) (such poor English), will perform the regular functions of addition, subtraction, multiplication, or division entirely in H.MS format. This is to say that they will take their operands in H.MS format and return the result in H.MS format. [<-|] [0] will take an operand in H.MS format and put it in decimal degrees format. [<-|] [.] will perform the opposite function of taking an operand in decimal degrees format and converting it to D.MS format. These functions have a variety uses, especially when checking plans or figuring out an azimuth. Exmple: Say that you want to subtract 45-30-00 from 50-00-00 you could do so with these keys. 50 [ENTER] 45.30 [<-|] [-] The answer of course is 0.30 (30 minutes). ******************************************************************* 8 ******************************************************************* The Custom Menu: |EART | | | |ABOUT|UTIL | [NXT] |INVER|TRAV |AZ/AZ|AR/LI|AR/AR|RADIA| [NXT] |LINEA|CONV |CURVE| VC | SLG |SUPER| [NXT] There are fifteen menu keys accessed with [CST] fourteen of these are sub-menus. |ABOUT| just displays something neat. The fourteen sub-menus let you solve those things you would like to figure out. What follows is a brief description of those sub-menus. From here on TFTOSAS means "Takes From Top Of Stack And Stores", and if you substitute that phrase in when you see it, it may make more sense as you read along. I. |INVERS| "Inverse Azimuth" solves for the azimuth and distance from point A to point B. A. |PT A| TFTOSAS a coordinate as point A. Example: To enter 123N 456E as point A one could key in 123 [ENTER] 456 |PT A| Or say you previously stored this coordinate as point #7 you could have recalled it to the top of the stack and done the same thing using: 7 [RCLPT] |PT A| B. |PT B| TFTOSAS a coordinate as point B. C. |SOLVE| Solves for the azimuth and distance. II. |TRAV| "Traverse" A. |Z&S->| converts a Zenith angle in level 2 and a Slope Distance in level 1 to a Horizontal Distance and a Vertical Distance. There is no display screen. This is sometimes useful for reducing notes. B. |POINT| TFTOSAS a coordinate to calculate from, the "Occupied Point." C. |HD2TL| same as | SIDE | except that it makes the resulting point the new "Occupied Point." Like "Head To Tail" when talking about vectors. D. |SIDE | takes an azimuth from level 2 and a distance in level 1 and solve for the resulting point from the "Occupied Point." 9 Example: Say you wanted to start at the coordinate (100, 100) and from there you went the direction 123-45-12 and distance 52.14 (not a side shot). 100 [ENTER] 100 |POINT| 123.4512 [ENTER] 52.14 |HD2TL| answer: 128.9700 N 56.6489 E The resulting coordinate is solved for and left on the top of the stack for possible use elsewhere (like for storing) and it is also made the new point to "shoot" from. Now say you wanted to calculate several coordinates from this new point "side shots", use the |SIDE | key. Let's try 45-45-45 100 and 74-18-19 361. 45.4545 [ENTER] 100 |SIDE | answer: 59.2065 N 74.1819 [ENTER] -14.9966 E 361 |SIDE | answer: 31.3152 N -290.8919 E III. |AZ/AZ| "Azimuth/Azimuth Intersect" solves for the intersection point of two lines defined by a point on the line and the azimuth of the line. A. |POL 1| TFTOSAS point on line 1. B. |AZ 1| TFTOSAS azimuth of line 1. C. |POL 2| TFTOSAS point on line 2. D. |AZ 2| TFTOSAS azimuth of line 2. E. |SOLVE| solves for the intersection point. IV. |AR/LI| "Arc/Line Intersect" solves for the intersection points of an arc and a line. A. | R.PT | TFTOSAS radius point coordinate. B. |RADIU | TFTOSAS radius. C. |P O L | TFTOSAS point on line coordinate. D. | AZI | TFTOSAS azimuth of the line. E. |SOLVE | solves for the intersection points. 10 V. |AR/AR| "Arc/Arc Intersect" solves for the intersection points of two arcs A. |R.PT.1| TFTOSAS the coordinate of the radius point of the first curve. B. | RAD1 | TFTOSAS the radius of the first curve. C. |R.PT.2| TFTOSAS the coordinate of the radius point of the second curve. D. | RAD2 | TFTOSAS the radius of the second curve. E. |SOLVE | solves for the intersection points. VI. |RADIA| "Radial Baseline" solves for coordinates on or offset to a radius baseline. A. |RD PT | TFTOSAS the coordinate of the radius point of the baseline. B. |RO/RO | TFTOSAS the radius and rotation of the baseline. C. |POC.S | TFTOSAS the point on curve station. D. |AZPOC | TFTOSAS the azimuth from the radius point to the point on the curve. E. |VIEW | F. |COO-> | takes a coordinates from the top of the stack and relates it to the baseline. The coordinate on the baseline at the station the point is offset to is left on the stack. Example: To figure out where (123, 456) is relative to the baseline : 123 [ENTER] 456 |COO-> | G. | INC | H. | STA- | I. | STA+ | J. | LEFT | takes an offset from the top of the stack and solves for the coordinate of that offset (left) from the last baseline station solved for with this program. K. | RIGHT| takes an offset from the top of the stack and solves for the coordinate of that offset (right) from the last baseline station solved for with this program. L. | STA->| f(STA)=baseline coordinate. 11 Example: Say you want solve for the coordinates of 34 + 00 and the 20 and 40 foot offset left and right, after you've entered the parameters that define the baseline. 3400 |STA->| 20 |LEFT | 40 |LEFT | 20 |RIGHT| 40 |RIGHT| VII. |LINEA| "Linear Baseline" solves for coordinates on or offset to a linear baseline. A. |P O L | TFTOSAS a coordinate as a Point On Line. B. | STA@ | TFTOSAS as the station at that point. C. | AZI^ | TFTOSAS as the Azimuth of the baseline pointing upstation. D. | VIEW | E. | COO->| takes a coordinates from the top of the stack and relates it to the baseline. The coordinate on the baseline at the station the point is offset to is left on the stack. F. | INCR | G. | STA- | H. | STA+ | I. | LEFT | takes an offset from the top of the stack and solves for the coordinate of that offset (left) from the last baseline station solved for with this program. J. | RIGHT| takes an offset from the top of the stack and solves for the coordinate of that offset (right) from the last baseline station solved for with this program. K. | STA->| f(STA)=baseline coordinate. VIII. |CONV | "Coordinate Conversion" converts coordinates formed in one system to their counterpart in another system. As parameters the coordinates on two points (the same two) in both systems need to be known. If you have a definite scaling factor, then enter it. If you don't, then set the scaling factor to zero and a reasonable one will be calculated for you. A. | OLD1 | TFTOSAS coordinate of point 1 in old system. B. | NEW1 | TFTOSAS coordinate of point 1 in new system. 12 C. | OLD2 | TFTOSAS coordinate of point 2 in old system. D. | NEW2 | TFTOSAS coordinate of point 2 in new system. E. |SCALE | TFTOSAS a scaling factor. If the unit in the old system were the foot and the unit in the new system were a yard then the scaling factor would be 3. Setting the scaling factor to 0 will let the program figure out the scale itself. If you do this then scaling factors very close to 1 will be forced to be 1. F. | VIEW | G. | BLOC | converts a block of contiguous points in the current file from the old system into the new system. The user is prompted for the information. H. | N->O | takes a coordinate in the new system from the top of the stack and converts it to a coordinate in the old system. I. | O->N | takes a coordinate in the old system from the top of the stack and converts it to a coordinate in the new system. IX. |CURVE| "Curve Data & Things" A. | /\ | TFTOSAS the "delta" of the curve. B. |RD/RO | TFTOSAS Radius and Rotation of the curve. C. |PC ST | TFTOSAS the Point of Curvature Station. D. | VIEW | E. |SOLVE | solves for various curve relationships. F. |SOLVE | solves for various curve relationships. G. |ARC-> | converts an arc length to a chord. H. | INCR | I. | STA- | J. | STA+ | K. | STA->| solves for the deflection angle for a given station. For a left hand curve, the full delta is at the PC station and 0 degrees is at the PT station. This is useful with instruments that measure angles only in one direction. X. | VC | "Vertical Curve" solves for elevations along a vertical curve. For areas outside of the curve, the solution taken as though on the tangent to the curve. The more precisely one enters the elevation parameters, the more reliable the answer will be farther away from the curve. 13 A. |BVCST | TFTOSAS the BVC Station. B. |BVCEL | TFTOSAS the BVC Elevation. C. |PI ST | TFTOSAS the PI Station. D. |PI EL | TFTOSAS the PI Elevation. E. |EVCST | TFTOSAS the EVC Station. F. |EVCEL | TFTOSAS the EVC Elevation. G. | VIEW | H. | INCR | I. | STA- | J. | STA+ | K. | STA->| f(STA)=elevation XI. | SLG | "Straight Line Grade" this solves for the elevations along a constant slope. This is useful for checking plans and for piping layout. A. |STA 1 | TFTOSAS a station on the baseline. B. |EL 1 | TFTOSAS the elevation at station 1. C. |STA 2 | TFTOSAS another station on the baseline. D. |EL 2 | TFTOSAS the elevation at station 2. E. | VIEW | F. | STA->| G. | INCR | H. | STA- | I. | STA+ | J. | STA->| f(STA)=elevation XII. |SUPER| "Superelevation" solves for a point along a typical segment of a Superelevation diagram. A. |STA 1 | TFTOSAS the Station at the first PI. B. |ELV 1 | TFTOSAS the Elevation at the first PI. C. | LEN1 | TFTOSAS the Length of the first vertical curve. 14 D. |STA 2 | TFTOSAS the Station at the second PI. E. |ELV 2 | TFTOSAS the Elevation at the second PI. F. | LEN2 | TFTOSAS the Length of the second vertical curve. G. | VIEW | H. | INCR | I. | STA- | J. | STA+ | K. | STA->| f(STA)=Superelevation XIII. |EART | "Earthwork" this program does some basic end area and volume computations. The area solution is my rendition of the old Double Meridian Distance thing. The volume is probably only useful if you have to fill out the same earthwork form that I do. I have a spreadsheet that takes care of these computations, but I'm not always afforded access to a PC or a printer. Sorry if it seems useless, but I thought I'd leave it in anyway. The first two menu keys are for area computation and the last four pertain to volume computation. This is one of the only programs with units directly attributed to it. To find an area with this, it is done using the old "DMD" technique. You basically start with a point on the perimeter and travel along the perimeter entering every breakpoint along the way. When you come full circle and reach the point you started at, the area is revealed. Example: You have an area bounded by the points (0 0) (1 2) (6 5) (0 0) the area is 3.5. To find this with the programming at hand, these are the keystrokes: 0 [ENTER] 0 |START| 1 [ENTER] 2 |NEXT | 6 [ENTER] 5 |NEXT | 0 [ENTER] 0 |NEXT | pg 14 15 Recalling coordinates to the top of the stack and entering them with |START| and |NEXT | will also work and is useful for finding areas of lots and things. Finding the volume of some earthwork thing like excavation or embankment using the old end-area method is what the last four keys are geared for. Like I said, this was created for those of us that had to fill out that Department of Transportation form. Try these keystrokes and you should understand how and what it does. This works good with a printer. |RESET| 100 [ENTER] 200 | S&A-> | 150 [ENTER] 250 | S&A-> | 200 [ENTER] 151 | S&A-> | |TOTAL| Keep in mind that rounding takes place at various places. Experiment and observe. A. |START | B. |NEXT | C. | L/S | toggles you between using the long and short form for calculating earthwork volume. D. |RESET | resets the volume quantity to zero. E. |TOTAL | recalls running total volume to stack and displays. F. | S&A->| takes station and area at station from stack and displays appropriate calculations (end area method). XIV. | UTIL | "Utility functions" A. | FILES| interactive screen that works with JASON's files. May not be installed. Use this to select and create and delete coordinate files. Sorry, I never figured out how to engage the alpha-lock with a program. B. | BOOST| takes a number from the top of the stack and boosts the current file by that many points if possible. C. | INIT | re-initialize the USER defined keys and flags. Sets the USER keys flag. D. | PRINT| toggles PRINT MODE on and off. E. | N/S | toggles coordinate system between North and South azimuth. F. | VIEW | ******************************************************************* 16 ******************************************************************* Miscellaneous: This set of programs is in the form of a library object. Its ROMID is 1013. The installation program stores the library object to port 0. If for some reason you would like to store and run this library object from port 1 or port 2 (if you have a RAM card), I believe you can. Again, I can't tell you for sure. I never tried. However, you can try. Just recall the object to the stack and store it in one of the other ports. You may wish to purge the library. If so, then I recommend that you warm start the system first. [ON] + [C] When the system comes back to life, try these keystrokes: [|->] [+] [0] [|>] 1013 [ENTER] you should see :0:1013 on the stack or something very similar depending on the display setting. Next get to the HOME directory and detach and purge the library. [ENTER] [alpha] [alpha] DETACH [SPC] PURGE [ENTER] That should have done the job. ******************************************************************