~~~~~~~~~~~~~~~~~~~~~~~
Lat-Long Conversion 1.1
~~~~~~~~~~~~~~~~~~~~~~~
by Scott McAfee
scottm@ccnet.com (report errors here)
November 14, 1997
Based on code by Tan Kok Mun. 
Tested with V. 0.84 of CbasPad
Freeware

INTRODUCTION:
The following program was written to be able to easily convert between
different formats of expressing latitude and longitude coordinates.  Such a
tool can be very useful to those that work with Geographic Information Systems,
especially while digitizing maps or working with GPS units.

The formats it converts between are:

Degrees, Minutes, Seconds (or DMS, where 60 Sec=1 Min and 60 Min=1 Deg.)
(e.g. 122 Deg. 30 Min. 32.995 Sec.

Decimal Minutes
(e.g. 122 Deg. 30.54987 Min.)

Decimal Degrees 
(e.g. 122.50917 Deg.)

INSTALLATION:

You will need Ron Nicholson's very cool Pilot Basic Interpreter: "cbasPad" to run this program.
The latest version can be found at http://www.nicholson.com/rhn/pilot.html

1.  Copy latlon11.bas (an ASCII text file) into your Pilot Desktop memopad.
2.  HotSync
3.  In your Pilot, move in two chunks (line 640 is a good break) to an empty cbasPad space.


LIMITATIONS:
1)  Rounds to nearest 100,000th degree when decimal degree => 100
    This seems to be due to a limitation on the length of a floating point
    number.  Not sure why, but error is less than 1 foot when rounding up.
2)  Does not work with negatives
    I didn't think it was worth the code space to correct for the western
    and southern hemispheres when it's so easy to do manually.
3)  Does not work well with minute and second values > 60
    You shouldn't be thinking that way anyway, but I might fix that later.

KNOWN BUGS:

------Release 1.1------
Seems to work fine after adding some variables to deal with some of the 
more cumbersome nests in 1.0.  More recent versions of cbasPad didn't deal
as well with complex nests, but the floating point improvements more than make
up for it.  Haven't seen the Fatal Exception mentioned below yet.
------Release 1.0------
Occasional Fatal Exception Error
Don't know what causes this, if it's my program, cbasPad or any of the various 
hacks I'm running.  Soft resets after the error result in no data loss.

CONTACT INFO:
If you like the program, find bugs, or have fixes, please email me at

scottm@ccnet.com  

Web page: http://www.ccnet.com/~scottm/  (astrophotography, no pilot stuff)