
PROGRAMING INFORMATION

Programs like COX and XLINE were written for the SX but will also run 
on the GX.
The more complicated programs using nested menue call have have GX and 
SX versions.  The underlying programming structures for SX and GX are 
the same, but because of different internal menu numbers the program 
code has to be tailored to the differences.  Also error message 
displays are tailored to the differences between the SX and GX key 
boards.  

Programs are optimized for speed:

	 Only local variables are used for internal operations and 
	  calculations.  Local    variables are accessed by programs 
	  much faster than global variables.

	 All subroutines are generated at start up and become local 
	  variables.

	 Wherever possible calculations utilize the stack rather than 
	  repeated local variable calls.  Fetching values from the 
	  stack is even faster than recalling local variables.  
	  Algebraic expressions are not used - too slow.

	 The HP's built-in STO+ and INCR functions are utilized where 
	  needed.

	 Complex number manipulation is used in most the computations 
	  used in the TRAV program.  This eliminates the programming 
	  overhead of tracking and dealing with angular quantities.


The only global variable used by these programs are the names 
associated with a saved or retrieved data file.  The data file are 
automatically placed in PORT :0:.  Files saved to PORT :0: are not 
readily deleted by accident.

Some of the programs are too large to review or edit on the stack.  It 
takes approximately 20 minutes to decompile the TRAVGX program on the 
stack.  I used an IBM clone computer with Hewlett Packard's PDL 
program to create, edit and download this program to the HP48's.  To 
get around PDL's 400 line limit, I place as many commands
on a line as is practical.  The Windows based CalcWare is even more 
limited than PDL.  I also use the text editor found in WordPerfect or 
Word to write my programs.  These word processors are not limited to 
400 lines but the special charactors used by the HP calculator require 
you to use the ASCII Charactor Translations.  These translations are 
discussed section 27 of the HP 48GX Users Guide.
For example:   HMS  as seen on the HP display would be typed  
\<< HMS\-> \>>  in WORD.

Instructions or manuals are available for most of these programs.  In 
some cases the ASCII code for the program includes a description of it 
various functions.


PROGRAMS:

ADDLAST (Add the Last level 1 obj to new level 1 obj) 31.5 bytes by 
V.A. Maletic
31.5 bytes

To add a positive or negative constant to a succession of numbers.

Example: To subtract .65 from 13.45, 13.49, 13.53, 13.56 etc.
Do this:
13.45 [ENTER] .65[] [+] -> 12.80
13.49 |ADDLA|            -> 12.84
13.53 |ADDLA|            -> 12.88
13.56 |ADDLA|            -> 12.91
etc.


BSEAT (Bearing SEAT) by V. A. Maletic
3211.5 bytes

This program calculates corner grades for girder bearing seat areas.
The corner grades define a surface that is level along a normal to the
girder in the bearing area and simultaniously parallel to the gradient
of the deck surface.  It requires a contour map of the bridge deck.

Girder seats that are parallel to the deck gradient longitudinaly and
level along a perpendicular to the girders axis provide lateral sta-
bility and less restraint to longitudinal movement of the bridge.

Please note on curved bridges with skewed bents each bearing seat will
have its own skew angle value.  Using the plan skew is not sufficient.

Execute PIC in menu for geometry notations.


COX (Curve Offset at X distance) ver 1.5  by V.A. Maletic 11-08-92
4112.5 bytes

This program is a curve layout program with special utilities for
field use.
Curve layout can be calculated by the chord offset or tangent offset
method.  Also offset layout lines and crossfall corrections can be
be applied as needed.  User flag 1 indicates and offset line is in
use and being applied to results.  User flag 2 indicates a crossfall
correction is being applied to results.

   KEY     USE
------------------------------------------------------------------------
  CHORD    Input a keyed in or calculated chord
  RAD      Input a keyed in or calculated radius
  QUIT     Exit program, delete pointers and restore memory
  XC       Input a distance from 0 along the chord line
  XT       Input a distance from BC along the tangent line

For Chord Offset layout there are three utility keys:

  CV/2     Eliminates working with large unwieldy offset distances
           by dividing a curve into two parts with corresponding chords
           and much smaller offset values for each.  To use the new chord
           press the "CHORD" key on menu 1.  Offset values calculated for
           the first half section of curve can be used for the last half.

  MO->R     Calculates a radius that fits a given chord and midordinate.
           To use the calculated radius press the "RAD" key on menu 1.

  PIC      Provides a picture and sign conventions for chord layout of
           curves.

For Tangent Offset layout there are three utility keys:

  X,OFF    Calculates a radius that fits a given tanget
           and offset distance.  To use this radius in subsequent
           input it by pressing the "RAD" key on menu 1.

  T->CD    Calculates a chord that corresponds to a given tangent
           distance and a previously inputted radius.  To use the
           the new chord press the "CHORD" key on menu 1.

  PIC      Provides a picture and sign conventions for tangent layout
           of curves.

Two utility keys apply to both Chord and Tangent layout methods:

  OFFSE    Incorporates an offset line into calculated curve offsets.
           When active USER FLAG 1 annunciater is lit.  To cancel,
           key in 0 and press "OFFSE".  Flag 1 will clear.

  XFALL    Incorporates a slope correction in the calculated curve
           offsets.  When active USER FLAG 2 annunciator is lit.
           To cancel, key in 0 and press "XFALL".  Flag 2 will clear.

To see more menu key descriptions press the REVIEW key(LS 3,5).
Use the interactive stack key by pressing the UP key(2,5) to review
all previous inputs and results.  Press ATTN to return.
This program uses local variables and the stack for all calculations.
Use the "QUIT" key on menu 1 to exit the program and restore memory.


NNP - Nine Point Plot  by V.A. Maletic
1005.5 bytes

This program is used to spot irregularities or blunders in nine-point
elevations taken of existing bridge spans for widening purposes.
Elevations can be verified in the field before moving or taking down
the level.

It also outputs a residual list and a moving residual list.  These list
can be used to stringline in profile elevations at 9 pt dowels.

This program takes a nine element list { E1 E2 E3 .. E9 } of uniformly
spaced elevations and generates a screen R-Plot of them.  If a bridge
span or approach slab is so short that elevations taken at 1/8th inter-
vals (nine points) are too close, you may place on the stack a five
element list { E1 .. E5 } of elevations taken at quarter points of the
span or approach slab.  Five element lists of elevations are expaned
into nine element list by insertion of intermediate average elevations.

Thus { E1 E2 E3 E4 E5 } becomes -> { E1 E12 E2 E23 E3 E34 E4 E45 E5 }.

If you begin with an empty stack this program will sequentialy prompt
for the nine elements required.

The R-Plot is labled along the bottom with point numbers and the maximum
positive or negative residual.  Eighth span tick marks are provided.
An R-Plot of the elevations removes the gradient between E1 and E9 and
plots the interior elevation's deviations (residuals) from the E1->E9
gradient.  The resulting R-Plot is displayed on the graphics screen and
irregularities (or blunders) in the nine point elevations are usually
very obvious.  The magnitude of irregular elevations (blunders) can be
estimated by inspection.


SPANPROFILE ver 1.5 by V.A. Maletic  2-28-93
3872.5 bytes

This program can be used to develop span profiles.
SPANPROFILE begins with a straight or vert curved line through two
given points of known elevation or height and whose distance between
them is known.  A vert curve is applied by inputting a +/- 'c' value.

A span camber can be applied by inputting a max +/- value and
pressing a camber type key (Sgl span, 1st span, Inter span Last span).

A correction adjustment can be applied by inputting a max +/- value
and pressing a type key (Rev curve corr or Straight line corr).
The correction will be zero at P1 and max +/- value at P2.

Cambers and corrections apply only to distances between P1 and P2.
Outside of P1 and P2 only vertical curve applies.
Direction convention:  Layout stationing is directed from P1 to P2.
First span is of lower station than last span.  Interior spans have
stations larger than first span and less than last span.

The DATA key copies the following to the stack:
P1, P2, L, c, K, slope and if applied:
Camber type, value 9pt[list];  Correction type, value, 9pt[list]

PLINESX or PLINEGX (Profile LINE for SX or GX) ver 1.2 by Victor 
Maletic 4-14-98 5837.5 bytes

This program calculates elevations along three types of profile lines.  
The profiles are inputted and saved as data files that can be 
retrieved anytime elevations are required from it.  After profile data 
has been entered and editing option is available so that the input my 
be checked and corrected if necessary before it is filed.  Additional 
features:

	 Addition of a positive or negative constant value to 
	  computed elevation.

	 Calculate elevations at specified intervals from a specified 
	  starting station.

	 Station range checking.  Will not calculate elevations 
	  beyond profile limits.

	 Profile data files are stored in port 0 to reduce accidental 
	  erasure.


XLINE ver 1.6 by V.A. Maletic  3-27-93
2539.0 bytes

This program is an extended LINE program hence the name XLINE.
XLINE will generate a straight or vert curved line through two given
points of known elevation or height and whose distance between
them is known.  A vertical curve (parabolic) is applied by inputting
a +/- 'c' value - positive 'c' for upward curvature - negative 'c'
for sag curvature.

A correction adjustment can be applied by inputting a max +/- value
and pressing a correction type key (Rev curve corr, Straight line corr
or Bell curve correction).
The correction will be zero at P1 and max +/- value at P2.

Corrections apply only to distances between P1 and P2.
Outside of P1 and P2 only straight or vertical curve line is available.
Direction convention:  Stationing direction is P1 to P2 and P1 = 0.

The DATA key copies the following to the stack:
P1, P2, L, c, K, slope and if applied, correction type, max/min value,
and 9pt[array] of values.


TRAVGXv6 or TRAVSXv6 ver 6 by V.A. Maletic  3-30-98
16901.5 bytes

The TRAV program is used to calculate coordinates for structure layout 
and checking reference staking.  This program makes it easier to 
coordinate key structural elements and 'RP' staking for cross-tie 
checks, transit angle checks and other checks.

Commercial computer surveying programs have more capability than TRAV 
does, but access to them and familiarity with them is often limited.  
TRAV is optimized for structure layout and 'RP' checks.

With TRAV you are encouraged to work directly on the project plans 
generating coordinates for structural features and 'RP' points.  You 
can write the coordinate values directly on the plans as they are 
computed or better yet - just write down the point number 
automatically assigned to each calculated coordinate.  To inverse 
between any two points, enter their assigned numbers on the stack and 
press the (INV) key.  To compute the coordinates of two intersecting 
lines, input a point number and associated azimuth for each line and 
press the (INTER) key. You can also define a line to be intersected 
with two point numbers.  Line-Distance and Distance-Distance 
intersections are also available.  Each line or distance input can 
have an offset value that will be used in the intersection.  See page 
9 for a description of key conventions used above and below.


Traverse data generated can be saved to a file name of choice and 
later retrieved for additional traversing, inversing or line 
intersections.

Some other features of TRAV:

	 Repeatedly traverse up the current azimuth specified 
	  distances without having to key in the azimuth each time.

	 Reverse azimuth direction.  A reversed azimuth will be 
	  displayed along with accumulated distance since last angle 
	  change.

	 Move to any previously calculated point number and begin a 
	  branch traverse.

	 Incorporate a non-traverse point.  This point will become 
	  part of the traverse file and can be used like any other 
	  calculated point.

	 Traverse along a curve to point of interest as defined by 
	  stations or arc distances from the BC.  Azimuths to the 
	  radius point, radius coordinates, POC stations and 
	  coordinates and current azimuth ahead on tangent line are 
	  displayed.

	 Convert bearing and quadrant numbers to azimuths.

	 Convert skews to deflection angles.

	 Show an azimuth 90( left or right or 180( of current azimuth.

	 Convert feet, inches and sixteenths to decimal feet and the 
	  inverse.

	 Calculate areas bounded by straight lines connecting 
	  specified coordinate numbers.

	 Utilities for working with triangles, polar to rectangular, 
	  rectangular to polar, radians to dd.mmss, dd.mmss to 
	  radians, HMS, HMS, HMS+ and HMS-.

 

 

