Site hosted by Angelfire.com: Build your free website today!

KingKogo for the HP
          48, 49 and 50 and ARM Pocket PC

__________________________________________________________________________________________________________

Art Surprise for sale. Small, inert and safe. I can’t say what you're paying
for except it’ll be a 4-5" wide, smooth, somewhat oval and flat river rock, oil
painted top and bottom with a natural scene based on Virginia Blue Ridge
surroundings, with a location description and date included on felt padding.
Charming, attractive, quality work, as well as useful, and $10 cheap!


__________________________________________________________________________________________________________
By Richard A. Smith

KingKogo started out as a massive keystroke program for
the HP 42S.
I no longer own a 42S, and the handwritten
stack of code created and
modified from 1990 to 1994 is
in a box waiting to be transcribed for emulator use. The
original HP 48GX page can be viewed here.
I called it
FreeDS originally, as a play on TDS.

KingKogo is an open source, free data collection, cogo and
stakeout application for the HP 48, 49 and 50 series calcu-
lators.
The program code is identical for all three, except
for the user key assignment list. With KingKogo I am pro-
moting a concept
diametrically opposed to the ubiqitious
window,
menu list, 'choose box' paradigm employed by TDS
and other
products for the HP 48GX.

KingKogo is command line and stack oriented. All user
functions are found on the first three pages of the VAR
Menu and the keyboard.
A keyboard template image is in-
cluded for you to construct your own.

You have to supply your own printer, x-acto knife, protective
spray and scotch tape.



My MSDOS program SkiVert is used to convert P,N,E,Z,D
format coordinate
files to the HP48 directory type file used
by KingKogo and vice versa. You can make
DXFs interact-
ively from P,N,E,Z,D files. You can also make Leitz/Sokkia
SDR POS (column delimited) and P,N,E,Z,D files from
Leitz/Sokkia's OBS (raw) format. My thanks to James N.
Taylor for the significant amount of his code in the DXF
routines.

I have included kogo.E48, KMLs and bitmaps for the
Emu48 desktop and Pocket PC version HP 48GX emulators.
Pocket PCs running Windows CE 4/Mobile 2003 can be had
at used computerparts stores for $30 or so, priced far less
than used 48GX's. I run Emu48 w/KingKogo on an old Dell
Axim X5 I bought in 2008 for $35, and plus $40 for a new
Spark LAN wireless G CF card for internet access I have
been very pleased with the low cost alternative.

Thanks goes to Mike Morris for the Topcon communications
source. And regarding the
Emu48 version of KingKogo,
thanks to Casey Patterson for Float_GX
and Jeffery L.
McMahon for his
Jemac files. Last but definitely not least,
I thank James N. Taylor for his time and patience.

__________________________________________________________________________________________________________

Installation

Make sure your IO settings are as follows:

For PC to 48GX: wire, ascii, 9600, 0, 3, 1

For 48GX to 48GX: IR, binary, 9600, 0, 3, 1

Send the 'Kogo' file to your HP using Kermit, Ripterm, or any
serial communications program
which supports the Kermit
protocol. Insure that thefilename as saved
on the calculator
is uppercase "K", and lowercase "ogo".

After the transfer is done, switch to the Kogo subdirectory on
your HP.
Type U K S . (Include the period at the end.) A list
will appear on the
stack. This is the "User" key assignment
list.
Press [Left-Shift] [CST] [KEYS] [STOK]. The list is now
saved in
memory, and will be referred to when "User" Mode is
active.
Next, type 4 [ENTER] [alpha] [alpha] F I X. If you
prefer the date and time display, press
[Right-Shift] [CST]
[
^] [ CHECK ] [OK] .
Finally, set "User" mode by
typing 62 [+/-] [alpha] [alpha] S F .
The Kogo Subdirectory

KingKogo exists as User RPL coded program and data
variables
in the Kogo subdirectory, accessed via the
VAR Menu. The VAR key is
labeled MAIN on the key-
board template @ key 24.1. Pressing it will
return you
to the first page of the VAR Menu. All functions are
designed
to be used from the Kogo directory. Although
it is possible to use some
functions from job subdirect-
ories or elsewhere without generating error
messages
or spurious output, KingKogo has not been completely
idiot
proofed at this time. Idiotproofing has been im-
plemented in areas where
input errors would cause
major recovery headaches.
__________________________________________________________________________________________________________
The Keyboard Template

Though I did use this program with the HP 49G, and it did function correctly, with or without the Topcon, the 49G itself was
a nightmare to use. I never did make a keyboard template for it. I threw the calculator against a tree one day, and took it
apart later, never to be used again. So, if you actually use a 49G and want to use KingKogo on it, you can study the following
template images and make your own, customized for the 49G.

48 Template image



I left out certain details on the 50G and
Pocket PC examples - the red high-
lighted areas denoting instrument acti-
vating commands,and the black borders indicating grouped com
mands.
Program code and functions are iden
t-
ical for each platform, with the excep-
tion of the user mode key assignment
list for the 50G.

50G Buttons


The 50G was a challenge compared to the
48GX when designing the template. Unavailability of the directional keys for assignment
made an extra key row a requirement.
PPC template


The Dell Axim screen is suprising-
ly readable, considering the ex-
tremely small characters. I found Emu48 to be usable on a Casio
from years ago, but not so much
on the HP Jornada.

Function locations were designed with preservation of useful native commands in mind. Certain functions are grouped by
usage context.
They occur on a common key, or if spanning multiple keys, are bordered in black on the 48GX example.
At four locations function names lie on a red back
ground. These are associated with instrument communications. Again,
this not the case for the Emu48 and 50G versions, as I decided that those particular schemes compromised readability
on the small Emu48 display, and were not critical in any case. I feel it looks kind of cool on the 48, so I've left it alone.

___________________________________________________________________________________________________

The following section consists of command listings and usage instructions. Screen output
images, including VAR menus are essentially the same for the 48 and 50 series. As far as
the template images go, the blue and purplely key headings are 48GX examples, the white
headings with greenish background are of the 50G. Yeah, there's no 49G images. I'm sorry
if you are using a 49G and are interested in KingKogo.
Well, I'm just sorry if you really are using a 49G.
In the following section, you will notice numerical key designations from time to time, such
as "STP @ key 32.1". These only apply to the HP 48GX or the emulator, not the HP 50G.
The images alone should guide you. This document was originally written before the 49 or
50G calculators came into existence, and is still very 48-centric. That being said, you
should be able to get by with the keyboard images. Also, due to additional space because
of design, I was able to spell out certain commands such as "Stakeout" instead of SO, Desc
instead of DES when making the 50G's template. These discrepancies should be of mini-
mal impact if you look at the context in which the command is being discussed.

Creating (or Switching) Job Directories

VAR Menu Page 2
 

The JOBS. directory is reserved for subdirectories created
using ->JOB. If a subdirectory by the name submitted
exists, that subdirectory becomes the target for point data computations.
Ex: [alpha] [alpha] OAKSPRINGS ->JOB.

If you have trouble remembering a jobname, go to the
JOBS.
sub- directory, press [ ' ] [ jobname ] MAIN NXT ->JOB.

_____________________________________________________

Radial Stakeout by Point#

              

Use SO for radial stakeout by point#, SO+ and SO- for
the same thing
w/ incremented or decremented point#'s.
An angle right and distance is
generated and put on the
stack. You can also recall this information via
the
To SO screen.

                


_________________________________________________________

Stakeout Measurement

                           

MEAS can be used after a point stakeout using SO. If GUN
is OFF,
manually keying in the measurement and pressing
MEAS generates
a come or go value. No provision for vertical information exists if using MEAS manually. If GUN is ON,
pressing MEAS initiates an instrument
measurement, and
generates the As So (As Staked out) screen.

 Stack after manual MEAS

                    



(By the way, if the numbers on the depicted screens don't
seem to work mathematically in it's because
they don't!
They were generated using Emu48 without the benefit of a
total station,
and are intended for layout illustration only)
_________________________________________________________

Radial Stakeout to a Line

                            

BL is used to set up a line, using a beginning point# and
ending point#,
azimuth or bearing/quadrant#. Subsequent
use of BegSta, At Sta, DIST,
->OS., or ->RAD. puts an
angle right, distance, and N, E values on the
stack, and
generates the To SO screen.

The coordinate can be saved with STP . Note that it is
NOT necessary to
save coordinates prior to getting
stakeout data. BL needs help in telling whether the
object on stack level 1 represents an
azimuth, quadrant
or point#. Since the object at level 2 (if we're working
with
an  azimuth or two point#'s) is by default a point#,
we need only to distinguish
the second point# by pre-
fixing it with a 'P '. This can be done with the alpha

function as in [alpha] P 200 [ENTER ], or more efficient-
ly by keying in the
point# and pressing MkP#.

Another line stakeout method is BLRef (Left-Shift MEAS).
BLRef can use
a coordinate generated by manual SS,
a point# (prefixed w/ MkP#), or the
measurement list pro-
duced by SS w/ GUN ON. BLRef then generates
reference
information to guide the rodperson.


________________________________________________________

Intersections and Resections

          

All of the routines listed in this section solve for the coordinate
of one
unknown point.

2 RES ( 2 Point Resection)
Technically not employing 'resection' calculations but involving
a bearing
rotation solution,  this procedure is sometimes re-
ferred to as 'free stationing'.
It uses two known points, a back-
sight distance, angle right and foresight distance


Enter two point#'s, a distance, an angle right, and a distance:

112  201  57  326.2318  302.0937  2 RES

3 RES (3 Point Resection)
(Collins Method) With 3 RES a all you need are three known
points and two angles.
Since distances are not necessary,
this eliminates the need for a
rodperson's presence at any of
the points as long as they are visible.
Which pretty much
means you'd be sighting building corners, radio towers,

Enter 3 point#'s and two angles in the order of observation:

112  201  57  326.2318  302.0937  3 RES

AAX ( Azimuth - Azimuth Intersection)
I saw no point in enabling the use of bearings and quadrants;
it
seems a small thing to convert them yourself.

Enter the first point#, azimuth, second point#, and azimuth:

42  107.1829  44  05.1749 AAX

DDX ( Distance - Distance Intersection)
As you know, there are two solutions to any distance - dis-
tance
intersection problem. This routine returns one solution.
You determine
which one by entering the known points and
distances in sequence so
that the solution lies to the right,
or clockwise (less than 180 degrees)
fromthe known points.

Enter the first point#, distance from it, second point#, and

distance:

109  32.67  111  50.00 DDX

ADX( Azimuth - Distance Intersection)
Enter the first point#, the azimuth, the second point# and
the distance.

42  232.47  44  325.1209 ADX

Relevant Settings and Storing Point Data
with STP.

           

50setbut     50stobut

Overwrite protection (Flag 23) is set or cleared using OwP on
the
keyboard template @ key 62.3, in the "SETTINGS" group.
Point data exists as list objects stored in variables. Due to the
variable naming convention of the 48, these variables begin with
an alpha character, in this case "P", which is automatically
prefixed to the numeric part of the variable name when stored
using STP , found on the keyboard template @ key 32.1, or
the
first page of the VAR menu ( MAIN ). Storing a northing and
easting
or northing, easting, description as an unused P#, or
existing P#
if OwP  is off is as follows:

          N  E  P#   STP
or   N  E  D  P#  STP

You'll notice that the point number is returned to the stack with
a P as a prefix. Point numbers are named in this fashion and
used
for point data storage. Point data ( n e z d ) is saved as a
LIST object.

A default Z value ( 0 ) and description (as set w/ >Des on the
keyboard template) are saved along with the given N and E
when using the first example. The result might look like this:
{5000 5000 0 PROPCOR }.

The result using the second example might be like this:
{5000 5000 0 TRAV }. By including the description for storage,
the default description is ignored. If you wish to save coordi-
nates and
are unconcerned about descriptions, use a single
character for the
default description to save memory.

Storing elev. using exist point#. (OwP status disregarded.):

Z P# STE

Storing desc. using exist point#. (OwP status disregarded):

D P# STD

The procedure for quickly storing all point data
using the above commands is as follows:

N E D P# STP Z SWAP STE

An efficient solution would be to store groups of points with
like descriptions, setting the default description with >Des
beforehand. The elevation would be stored as above, by
entering
it last, then SWAP STE .

>Des comes in handy when saving groups of like descripted
points,
though note that >P#, located left of >Des @ key 25.2,
cannot be
used to manually store point data sequentially.
These functions, along
with the others in their group, >MU
("Measure Up") and >HR (Height of
Rod) are typically used
prior to saving a point measurement w/ STP
during data col-
lection. Sequential point numbering is done automatically
at
this level, with the option of changing the next point number,

description or rod height.
___________________________________________________________

Relevant Settings and Saving Sideshots &
Stakeout
Measurements with STP.

           

    

Enabling or disabling instrument communication is done w/
GUN ON/OFF.
Pressing Left-Shift [Alpha] toggles Topcon
communications on and off.

With GUN OFF, the SS (Sideshot) routine takes an angle
right and distance
as arguments, returning a northing and
easting to the stack, ready for storage.
If GUN is ON, SS
ignores the stack. Instead it gets the angle and distance

information from the Topcon.
When an observation is obtained from the instrument using
SS or MEAS (after
a point stakeout using SO ), the pending
P# is placed in a LIST object along with
the received slope
distance, zenith angle and horizontal angle

{P123 100.7798 90.3015 310.1545 }

Afterwards, STP can be used to compute xyz coordinates
and store the shot.
(w/ Notes ON, raw data is saved too.)

STP computes rectangular values based on the instrument
data and the
values set by the functions listed below:



>MU      The "measure up" - from occupied point to instrument
>HI        Instrument Height - relative to sealevel - ( This is not
              accessed
via the keyboard template, but can be used
              from the VAR Menu)

>HR       Rod Height
>P#        Pending Point#
>Des      Pending Description

At any time prior to or after using SS or MEAS, and prior to
using STP,
you can change the current rod height, point#,
and description to modify the
point data. The point number
is automatically incremented for the next shot.

Using STP after SS with the observation LIST at stack level 1 produces
results
similar to using STP after MEAS, with the "Come" or "Go" string
generated by
MEAS at stack level 1.

"Go:12.34"

The instrument measurements LIST is put on the stack by SS;
MEAS
returns a "Come:" or "Go:" string. STP tests for the data
type and acts
accordingly. Why is the LIST not at level 1 in both
cases?
Distinguishing SS and MEAS derived output is necessary
so these procedures
can be properly formatted and appended to
the string saved as the 'NOTES.'
variable. With Notes ON, mea-
surements are recorded in a readable format,
analogous to hand
written field notes, including enough information to serve
as a re-
port file. The NOTES. variable contains a string (ie. text file) to
which
measurements are appended by STP while Notes is ON.
Associated with Notes is Nt Elev , an ON\OFF toggle for vertical
information
to NOTES., and PNte , a point data lister.
___________________________________________________________

Sample NOTES. string (w/ Nt Elev OFF):

Header:                               %%HP: T(1)A(D)F(.);
Begin String:                        "
Title:                                   Morrison - Lot 64
Date:                                   02-02-02
Crew:                                   Smith Bruce

List points using PNte:         P5013 { 4899.6397 5485.3933 0.0000 TRAV }
List points using PNte:         P5001 { 4261.3976 5524.3426 0.0000 P }

Occupied & Backsight:                      T@ 5013 Bs 5001
Stakeout point# & desc:       S/O  (5001) 'LOTCOR'
Computed ARt and HD:                         0.0000 639.4300
        S/O pnt recorded:               Rec as (5053) 'BSCHECK'
Measured ARt and HD:                         0.0001 639.4400
Sideshot point# & desc:       SS  (5054) 'HSECOR'
                ARt and HD:                         24.1033 52.8100
                                                   SS  (5055) 'EPOLE'
                                                           166.2053 12.3100
                                                   SS  (5056) 'WELL'
                                                           32.1043 162.4500
Stakeout point# & desc:       S/O  (5014) 'LOTCOR'
 Computed ARt and HD:                         294.0537 489.9800
S/O pnt recorded:                        Rec as (5057) 'CHK'
 Measured ARt and HD:                         294.0545 490.0200
Sideshot point# & desc:       SS  (5058) 'FLY'
                           ARt:                     1) 112.0522
                         ARep:                     2) 224.1046
       Mean ARt and HD:                     M) 112.0523 307.5500


Here's an example with NtElev ON:

%%HP: T(1)A(D)F(.);
" T@ 4718 Azi=280.1936 Bs 7021
MU=5.0200 HI=481.5200
HR=8.5800
S/O (7021) E=488.1000 TRAV9814
0.0000 157.8300
Rec as (9000) Grd=488.1000 BSCHK
359.5959 157.8300 V=15.1600 Cut:0.004
HR=4.8200
S/O (8009) E=476.5000 OS10
267.2328 65.8000
Rec as (9007) Grd=481.1800 RF
267.2324 65.7700 V=4.4800 Cut:4.682
SS (9008) Grd=475.7800 DWENT
202.1216 12.0800 V=-0.9200
"
END

Finally, a multiple angle example, generated by
using ARep.


%%HP: T(1)A(D)F(.);
"
T@ 1 Azi=0.0000 Bs 2
SS (304) TRAV
1)342.4209
2)325.2427
M)342.4214 12.5400
S/O (3) TRAV
3.2254 22.0400
Rec as (305) TRAV
3.0635 22.1300
SS (310) TRAV
1)125.2024
2)250.4046
M)125.2023 12.4200
SS (311) FNDROD
1)255.1900
2)150.3807
M)255.1904 12.5500

T@ 208 Azi=256.5308 Bs 207
SS (8005) TRAV
255.1904 12.5500
(578) 10876.1674 6977.2075 0.0000 TRAV
"
END

__________________________________________________________________________________________________________

Command List
Ordered by Menu and Template Position

Listed below are all of the KingKogo user functions and some
native keyboard functions preserved for convenience. Detailed
descriptions not already provided will be included with document
updates.

VAR Menu

Page1

R->P.                        Rect to Pol
P->R.                        Pol to Rect
INVERS.                    Point Inverse
->OS.                        Baseline Offset Distance
->RAD.                      Baseline Radius Distance
stp.                           Store point (calls STP.)

Page 2

->HI.                         Height of Instrument
->HR.                        Height of Rod
TLEV.                       Trig Levels - VD; ( Uses HI. and HR. )
DLEV.                       Differential Levels; ( Uses HI. )
->JOB.                      Create / Switch Job
JOBS.                       JOBS. Subdirectory

Page 3

ABC.                        Area by Coordinates
RC>A.                      Radius, Chord; produces Area Under Arc,
                                Arc Length

BEAM.                     (Used w/ Alidade and Plane Table) Distance,
                                 Beamon Arc Reading and Rod Reading for
                                 Ground Elev @ Rod
LEVL.                      (Used w/ Alidade and Plane Table) Rod
                                Reading
for Ground Elev @ Rod
                                (when alidade is level)
___________________________________________________________

User Keys

Label   ( Program Name )         Description

   

2 RES
( RESCT. )         Two Point Resection

3 RES ( TPRS. )           Three Point Resection ( Angles Only )
AAX ( BBINX. )             Azimuth - Azimuth Intersection
RCP ( RCP. )                Recall Point Northing & Easting
DDX ( NDDX. )              Distance - Distance Intersection
ADX ( BDINX. )             Azimuth - Distance Intersection



  
BL
( BL. )                     Establish Baseline by Point # - Point #,

                                    Point # - Azimuth or
                                    Point # - Bearing - Quadrant #

BegSta ( STA1. )          Beginning Baseline Station
MAIN ( S2M. )               Default to 1st Page of VAR Menu

>MU ( MUPR. )            "Measure Up" (For Height of Instrument)
>HR ( >HR. )                 Height of Rod
>P# ( >PNT. )               Set Pending Point #

>Des ( >DESC. )           Set Pending Description
prev ( PREV )              (Native Command) - PREVious Menu Pge

SHI ( HIGET. )               Establish Instr. Ht. by BM Shot

     

updir
( BUPDIR. )         UPDIRectory - Will not go above 'Kogo'
                                      to the HOME
directory
PNte ( SPCTN. )          Write Point data to NOTES. and Display
STP ( STP. )                  Store N, E or N, E, Desc as Point #

STE ( STOEL. )              Store Z to Ex. Point #
STD ( STOD. )               Store Description to Ex. Point #

      

DIST
( DIST>. )               Distance Interval along Baseline

To Sta ( STA2. )             Stake at Station Value along Baseline
UNDO ( UNDO )              (Native Command)
SETUP ( MKPNSETUP. ) Establish Occupied and Backsight
                                        Point #'s

HSet ( TOPHSET.48G )   Set Instrument Hz Angle
Trv ( AHD>. )                  Occupy New Point# , Backsight
                                      previously occupied Point #

     

To So
( SHOWD. )           Displays "To be Staked Out"
                                       parameters

As So ( SHOWD2.)           Displays "As Staked Out"
                                       measurements

As SS
(27 SF RECSHT. VSTR.)   Displays Sideshot
                                        measurements

Gen ( SETSHOW. )          The General Settings Info Screen


Label   ( Program Name )         Description

       

SO
( MKPNSO. )               Stakeout Point #

SO+ ( INCRN. )                  Stakeout Next Point #
SO- ( INCRP. )                   Stakeout Prevous Point #
SS ( SS. )                          Sideshot

OSA  ( AOS. )                    Angle Offset
ARep ( ADBL. )                 Angle Repetition
 



DDeg ( HMS> )                 (Native Command)
HMS ( >HMS )                  (Native Command)
HMS+ ( HMS+ )                (Native Command)
HMS- ( HMS- )                  (Native Command)
MkP# ( MKPN. )                Mark Integer as Point #
                                        (As Needed for BL., etc.)

HMSx ( HMSM. )               HMS Multiply
HMS/ ( HMSD. )                HMS Divide
MEAS ( SCD. )                  Measure Stakeout

BLref ( A2L. )                    Reference Point or Sideshot
                                         to Baseline

      
clear ( CLEAR )                (Native Command) - Clear
                                         Entire Display

 

  

Gun
( GOGO. )                  Gun Comm On/Off

Notes ( NOTER. )               NOTE. On/Off
Nte Elev ( ELO. )               NOTE. Elevations On/Off
OwP ( OWPSET. )             Overwrite Protect On/Off
Mtol ( ATOLSET. )             Set Mean Tolerance ( for ARep )