GPS.txt 6.8b            GPS or LORAN INTERFACED TO APRS

NEW IN VERSION 6.8b:  More feedback about the HSP switch implies that there
are an awful lot of combinations of voltage swings from GPS units and
different input requirements for PC serial ports.  You may need to experiment
with one, two , or NO diodes in the GPS switching circuit.

NEW IN VERSION 6.2b:  Some people reported garbled characters with the HSP
dual port switch.  The problem was not enough negative bias on the pin-2
RXD going into some PC's.  The fix is to add an additional diode voltage
drop between the emiter of the GPS switching transistor and the pin-2 RXD.
See my revised schematic.  If you don't need it, then don't add it.

NEW IN VERSION 6.01:  Added ARNAV aeronautical LORAN/GPS interface. See new
README/ARNAV.txt for details.

OVERVIEW: This file has evolved radically as this APRS project has developed.
We began seriously parsing GPS data within APRS for amateur applications when
the MAGELAN OEM GPS card became available for $445 in Sept 92 (down from
$1000).  Later the Motorola OEM GPS card came down to the same price range,
and these two devices were the only ones that we could find that were cheap
AND which had USER programmable reporting rates so that they could be set up
to operate stand-alone with only a TNC and radio as a tracking device.
Several HAMS began to build these autonomous tracking devices.  DRSI made a
special APRS ROM for TAPR-2 clone TNC's to permit power-up in the proper mode.

    Next, in August 93, I added the optional GPS serial interface to APRS so
that a laptop user could see himself tracked on the map.  This interface did
not require any unique programming of the GPS device and so it was compatible
with ANY GPS or LORAN device using the NMEA-0183 interface, but it DID require
a dual port laptop if both GPS and TNC operations were needed.  By December,
93, this capability was enhanced for single port laptops to permit both the
TNC and the GPS to share the same serial port.  If the GPS is programmable,
then use the SINGLE-PORT-MODE (SPM) below.  If it continually outputs data,
then use the HARDWARE-SINGLE-PORT mode (HSP) below.  In HSP mode, APRS toggles
the DTR line on the single serial port so that two transistors can then switch
between the GPS and the TNC on the same port.  It works!

     About this same time, PACCOM added a GPS interface command into its TNC's.
This capability now permitted you to build stand-alone trackers with MOST GPS's
and a PACCOM TNC instead of ONLY using a MAGELAN/MOTOROLA OEM GPS unit with
ANY TNC.  Howie Goldstein, N2WX, has also written special GPS commands for
other TAPR-2 Clone TNC's.  So has AEA.  Now that handheld GPS units are
readily available for under $399 and the PACCOMM TNCs include GPS commands
built-in, most people will probably prefer to purchase the handhelds.  The
only remaining advantage of the OEM GPS cards is in totally autonomous stand-
alone tracking devices.  When building a sealed up stand-alone package with
GPS/TNC and radio, there is still the problem of turning the GPS on and off!
Most hand-held GPS units have a keyboard ON/OFF button.  In a stand-alone
arrangement, even if the GPS is running on external power, someone has to
press the ON button!  On the other hand, the OEM cards power up whenever
power is applied.  (this is useful if you want the tracker to come on with
the vehicle ignition...)


* * * * * * * * * *     CURRENT RECOMMENDATION SUMMARY  * * * * * * * * * *

BOTH THE PACCOMM AND THE HOWIE GOLDSTEIN (N2WX) TNC MODS ARE FOR STAND-ALONE
TRACKING APPLICATIONS.  WITH THE TNC IN THE GPS MODE YOUR POSITION IS BOTH
TRANSMITTED ON THE AIR, AND ALSO AVAILABLE TO YOU FOR DISPLAY LOCALLY ON APRS,
BUT THE TNC SERIAL PORT IS USED UP AND NO LONGER AVAILABLE IN ITS NORMAL TWO-
WAY COMM MODE AT THE SAME TIME.  If you want to use your laptop as BOTH a
moving map display AND APRS communication device, you have three options:

FOR DUAL-PORT LAPTOPS:   ANY NMEA GPS and ANY TNC will work with APRS O.K.

SINGLE-PORT LAPTOPS: Choose between the following options:

    A.  Use a programmable MAGELAN or Motorola OEM GPS card and operate it
    in the APRS single-port mode with ANY TNC.  This results in only
    occassional (rare) glitches as the position data and TNC data are
    Diode-ORed together to the same port.

    B.  Use any GPS, with APRS in the single port mode.  Connect both the
    GPS and TNC to your serial port via a SPDT Push Button on your dashboard
    and press it for 2 seconds whenever you want to see (and update
    to APRS) your current posit.  All the rest of the time, the TNC is
    connected and operates as a normal comm device.

    C.  Use ANY GPS with APRS in the Hardware Single Port (HSP) mode and build
    a simple two transistor interface which permits APRS to switch between the
    two devices.  This permits automatic GPS reporting and is an improvement
    on option B above.  Since APRS controls the toggling, the potential for
    garbling is further reduced than in A or B.  (You can purchase the APRS
    port splitter from PACCOMM, or wire it up yourself)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

GPS EQUIPMENT SUMMARY

     The following are the only GPS units with which I have personal
experience.  Any GPS or LORAN with a NMEA output should work just fine with
APRS, and no-one has reported a NMEA device that DOES NOT work with APRS.
I do not have good experience with the USER interface and displays on most
units since I only use the NMEA output into APRS.  For this reason, my sole
purchasing criteria has been price! (including the serial output).  I have
purchased one of each of the following devices.  Many other APRS operators
have used many other GPS devices, and all (with NMEA outputs) work!  The
best places to check for prices and availability are:

  West Marine 1-800-538-0775    Currently (Feb 95) the GARMIN 40 is going
  Boat US     1-800-937-2628    for $299 and the GPS-45 for $399
  E & B       1-800-533-5007    these are NOT sale prices!

MAGELAN OEM CIRCUIT BOARD:  My first GPS.  Cost $450 plus $130 antenna.  Well
documented later in this file.  Output periodicity fully programmable and
includes GGA,GLL and VTG data.  Great for any TNC for stand-alone.  LNA on
board, can use home-made antenna.  5 channel.  12 volt model no longer
available.

MOTORLOA OEM CIRCUIT BOARD:  The smallest circuit.  Requires active antenna.
Output fully programmable and has GGA,GLL,VTG and RMC.  The RMC gives posit,
CSE/SPD all in one packet.  Great for any TNC stand-alone.  5 channel.
$480 with active antenna. $435 without.  VP-ENCORE is the latest 5 volt
version (TTL) for $299. ($344 w/antenna).  These prices have been the same
for the last year! (its now JAN 95).

GARMIN-50:  BEST BUY.  $400 in Feb 94 and includes mounting bracket, NMEA
cable and 6-40 volt supply capability built in!  Has RMC, but does NOT have
GGA (no altitude).  Handheld antenna can be remoted about 6 ft.  8 channel.
CAUTION:  To make pilots spend more for the aeronautical version, all
nautical GARMINS have a 90 kt limit and will NOT WORK above that speed!

MAGELAN MERIDIAN:  WARNING!  The latest Magelan Neridians no longer have the
RMC sentence!  This means that you cannot get Course and Speed in the same
packet for a stand alone tracker.  It works fine with direct connection to
APRS though.  If you get one without RMC, call Magelan at 909-394-5073, and
they will exchange it for one with RMC but without differential correction.

MAGELAN MERIDIAN:  Dropped below $400 in Spring 94.  Mounting bracket, NMEA
and external 12v converter are extra for $80, but are not needed if you give
it 6 volts and make your own data cable.  8 channel.  Handheld antenna can
be remoted about 6 feet.  Current drain is 130 ma.  Runs on 3 AA cells.  Also
has SAMPLING mode that extends battery life by factor of 10 or more.  It
wakes up every 10 mins locks on a posit and shuts down again.  To get maximum
life in this mode, be sure it sees the sky at all times, or it will come on,
and STAY ON until it gets a fix.  If you use a circuit that senses the GPS
current drain to switch the TNC and RADIO on and off as well, you can make
a stand alone tracker that will last about 4 days on a set of AA alkalines,
or 3 weeks on a set of D cells.  Using this combined SAMPLING mode, you should
set the TNC LOCATION rate to 30 seconds (my guess) so that you get at least one
posit transmitted while the combo is ON and getting a fix.  Remember that the
first fix transmitted each cycle will probably be the one that the TNC stored
from the last power up cycle.  Below is the pinout, looking at the back of the
GPS with wire colors for their $80 power/data cable.  Note that you do NOT
need their box for NMEA data, only for 6V power.  (This is MY OPINION.  I AM
NOT LIABLE FOR ANY PROBLEMS IF YOU MAKE YOUR OWN INTERFACE!)

  GPS    POWER/DATA CABLE BOX    WIRES OUT  SIGNALS

   *- +6V --[*reg*]-------------- Red       9 to 16 volts input
   *--------[-----]-------------- Yellow    reserved for future
   *--------[-----]-------------- orange    NMEA (+)
   *--------[?????]-------------- white     -20k +100K continuity through box
   *--------[-----]-------------- brown     NMEA (-)
   *--------[-----]-------------- black     Ground

I do not know how they manage power internally, but the GPS will run from
internal 3 AA cells with or without the cable attached.  If there is external
power, it knows it, and switches to external power.  When external power goes
away, THE GPS POWERS DOWN.  Pressing the ON button will power it back up again
on internal power!  I haven't yet tested to see if SAMPLING mode is on, and
it loses external power and powers down, if it will then still SAMPLE ON again
later with INTERNAL power.

Final comments, the Meridian does NOT output any NMEA data unless it is
getting a good GPS fix.  THis means you will be doing a lot of troubleshooting
out at the picnic table!  The Garmin, on the other hand, continues to output
NULL NMEA strings with only the comma separators when it looses GPS lock.

GARMIN GPS-45:  I saw one for about 5 minutes and was impressed.  Smallest
unit I have seen, AND includes a full map graphic display.  Zoom in close and
far out.  There is no graphics on the screen other than Waypoints and your
own track history, but the detail is great!  Driving 10 miles and back on the
Interstate, revealed two side-by-side routes, perfectly separated by 100 feet
the whole way!  Plus the clover leafs were perfect!  Price of $399 INCLUDED
bracket and detachable NMEA cable.  Antenna is BNC and remotable too.  If you
will NEVER go aircraft mobile (It also shuts down above 90 Kts), this looks
like the best investment.  Replay track histories stored in the unit into
APRS conversion programs and build your own APRS maps!  Output is +/- 2.5
volts so is directly RS-232 compatible.

GARMIN GPS-40:  Same as the GPS-45, but has internal antenna only and only
costs $299.  We think it comes with bracket and cables.....

TEKK DATA RADIO:  Not a GPS, but is a 2 watt UHF 9600 baud data radio about
the size of a credit card (and 3/4 inch thick).  See page 18 in Feb 94 QST.
Cost between $120 to $130.  Great for future 9600 baud POSITION REPORTING
NET TO DEVELOP on 445.925 MHz.  See UHF-FREQ.txt.

MFJ DATA RADIO:  Advertised in Nov 94 MFJ catalog.  Is a 5 watt single channel
XTAL controlled packet only data radio on 2 meters!  Costs $119 and comes
crystaled on 145.01.  Every APRS operator should call them and convince them
to provide the 145.79 crystal as standard.  I am convinced that they will sell
more 145.79 rocks than 145.01 for several reasons:
  1) these days, 145.01 is no different from any of 15 other packet channels
  2) Most normal packet ops need to be able to change frequency to access
     different nodes, BBS's and digipeaters.
  3) Conversly, APRS operators are looking for a SINGLE frequency radio to
     dedicate to their GPS and only on the national APRS 145.79 freq!
Call them at 1-800-647-8324 and convince them that they would sell more if
they offered the 145.79 xtal as a standard option at no additional charge!

0.25 CUBIC INCH 500 mw XMTR!  Agrello Engineering 518-381-1057 is selling
a postage stamp sized xmtr called the VFC400 for $99.  Glue it to your GPS
with the PACCOM PICO-TNC and you have a hand-held stand-alone tracker!

PACCOMM PICO-TNC:  Smaller than a cigarette pack.  Has an optional 2nd GPS
serial port!  Will sell for about $130 plus options..

MOTOROLA HT-220:  The venerable HAMFEST single channel HT can be bought for
as low as $20.  After taking off the front and back covers, hacksawing off
the battery compartment, and replacing the PTT switch with a tiny RELAY from
Radio Shack (PN# 275-241, you have a nice 3/4 watt packet radio, about the
size of a cigarette pack.  Add $20 worth of crystals for 145.79, and away
you go on 2-meters.  Be sure to get the models that will tune down to 2m.
----------------------------------------------------------------------------

THE REMAINDER OF THIS FILE HAS THREE SECTIONS:

    The first describes the new PACCOMM direct TNC interface.
    Second is the direct APRS software interface of GPS to your PC
    Third is the direct TNC/GPS interface for building stand alone trackers
       using the MAGELAN and Motorola OEM cards.
    Forth, in March 94, I added a section on Differential correction.


PACCOM GPS INTERFACE:  All recent PACCOM TNC's have a GPS ON command which
allows you to hook up ANY NMEA-0183 GPS device to the serial port and the
NMEA position report will automatically be transmitted.  In their 3.1 ROM,
the position was inserted into the BEACON text (after stripping off the $GPGGA
header.   In version 3.2 they provide for a LOCATION TEXT that will parse out
any user defined NMEA header and transmit it at a user specified periodicity.
These PACCOMM TNC's are the simplest and most direct way to go, since
  1) You will NOT need a special GPS OEM card that you wire yourself
  2) You will not need modified TNC code.
  3) You can buy completely integrated GPS/TNC/RADIO packages from PACCOMM
  4) If you do use the OEM GPS units, the PACCOMM 3.2 ROM also has a UI MODE
     command that tells the TNC to power-up in the UNPROTO mode

BUT THIS COMBINATION IS FOR STAND-ALONE TRACKERs!  WHILE IN GPS MODE,
the TNC is not used for packet communications.  You can also hook up the
stand-alone PACCOMM TNC up to an Ultimeter-II weather station for remote
reporting of WX conditions at your DIGI site.  (See WX.txt)

    The LOCATION TEXT in the PACCOM 3.2 ROM is independent from the TNC BText.
This keeps the BText free for other information. (particularly, for announcing
WHAT your mobile is doing, and what symbol to use, etc....)  This maintains
the same distinction between BTEXT and POSITS that APRS already handles easily.
Similaraly, the LText command allows you to manually enter your LAT/LONG or
grid square in your TNC, even without a GPS, so that TNC's in networks will
send their locations periodically.  The LText permits a free text format so
that it is compatible with any future specific formats (currently APRS parses
GGA, RMC, VTG, APRS L/L, PACCOMM and grid squares and a future 8 character
compressed L/L format) and there will probably be others too.

LOCATION TEXT TIMING:  For future designs, the minimum L period should be 1
minute for manual entries, but the LText UI frame should be sent out ONCE
everytime a new manual entry is made.  The ultimate objective for all UI
beacons should be to have the optional APRS DECAYING time period algorithm
built into all TNC's.  With the DECAY option, each new manual entry of BText
or LText will force a UI frame immediately, 15 sec later, 30 after that, 60
after that, 2 mins, then 4 mins, then 8 mins and so on to N minutes, and stay
at N minutes forever.  This way, new UI information is transmitted immediately
to all stations on the net, but old beacons soon fade away.  The minimum value
of N for the DECAY option would be about 10 minutes with a default of 60.
One other addition to complete the APRS philosophy, is to have the TNC respond
with both its LText and BText randomly within one minute of seeing an APRS
query (UI frame to the address of APRS with the text field set equal to
?APRS?)  This way, stations could drop back to a decayed beacon rate of once
every 4 hours or so, but still would pop up on an APRS map if requested.


DIRECT APRS GPS/LORAN INTERFACE OPTION:  Registered APRS users that select the
optional ($9) NMEA-0183 GPS option can plug just about any GPS/LORAN device
directly (almost) into a serial port of your APRS computer.  APRS will not
only plot the position of the attached GPS and its movements, but will also
transmit those position reports into the APRS net.  In this mode, you can also
select TRACK on the P-list to keep your mobile always on the map.  There are
four possible operational configurations:

     TNC only  - 1 Serial - Normal APRS for tracking other stations
     TNC/GPS   - 2 Serial - Normal APRS with automatic GPS position update
     GPS only  - 1 Serial - Tracking yourself (no other stations appear)
     TNC/GPS   - 1 Serial - Single Port Mode will do both! See below
     TNC/GPS   - 0 Serial - Stand-alone-tracker.  Doesnt use APRS except to
                            plot the resulting packets.

NMEA INTERFACING NOTES:  To interface a NMEA device to your APRS computer,
note that NMEA and RS-232 are not exactly compatible.  The NMEA specification
is actually EIA-422, an isolated differential receive circuit.  But in most
cases it should also work by simply connecting the NMEA pin A to RXD and pin
B to ground.  Both standards are the same sense, with NMEA a 0 and +5 volt
signal, and RS-232 a +3 and -3 volt signal.  The direct connection may not
work with many serial interfaces without a (-) voltage pulldown resistor.
(The GARMIN uses a good +/- voltage swing and does NOT need these resistors).
Often a series 1k resistor and a 5 to 10k resistor tied to your unused TXD
data line will suffice to provide the - voltage:

GPS NMEA OUT                                           LAPTOP SERIAL PORT
                       1 k
   A  >-------------/\/\/\/\---*------------------------> RXD
                               |          10K
                               *-------\/\/\/\/\--------< TXD

   B  *-------------------------------------------------* GND


NOTE!  If you use this kind of biasing on our GPS when connected to a TNC,
such as the PACCOMM for a stand-alone-tracker, be sure to set ECHO OFF so that
echoed data does NOT come back to the GPS on the TXD line!  If data comes out
of the TNC, then with the bias resistor, it will garble the data trying to
come in!  Also, do NOT connect your PC serial output to your GPS NMEA input
if there is one, since APRS does not send anything to the NMEA device.  It
has been reported that the TRAXAR GPS devices may lock up if you connect
anything to the NMEA input (remove the battery and do a hard reset to get it
back!)  Of course, if you are using one of the programmable OEM cards, then
you WILL make this connection in order to send commands to the GPS.

Once your serial port is set to the NMEA-0183 standard baudrate of 4800 baud,
you should begin to see raw NMEA data.  My APRS software recognizes four of
the NMEA-0183 formats:

    $GPGGA - for position and height  (no loran equivalent)  ] Use only one
    $GPGLL - for position only        ($LCGLL for LORAN)     ] of these two
    $GPVTG - for velocity and course  ($LCVTG for LORAN)
    $GPRMC - Posn, Course and speed   (Has all but height) (not in MAGELAN)


    APRS scans the interface data looking for a valid NMEA-0183  GLL/GGA/RMC
or VTG data format to extract position and speed information.  The data on
the NMEA interface is continuous and refreshed every second or two.  (If you
have been using a MAGELAN or a Motorola and have programmed a very slow data
period, you may want to reset this to a more normal few second rate.)  In order
not to saturate an APRS net or to overload your disk storage or to slow down
your other APRS keyboard processing, APRS only samples the data at slower rate.
This is called the REFRESH rate and is set during intitialization of APRS for
GPS or by using the alt-S-POSRATE command.  This period determines how often
your screen is updated from your own GPS.  APRS also has another period called
PACKET PERIOD which is usually set for 1 to 10 minutes also using the alt-S-
POSRATE command.  We have found that 30 seconds updates are OK for special
events when there are only one or two mobile APRS stations.  As more and more
stations go mobile with GPS/APRS, 1 minute or 2 minute updates are more
appropriate.  To further reduce channel loading, APRS will decay the period
when the station is not moving.


GPS MOBILE AND TNC WITH ONLY ONE SERIAL PORT (Single Port Mode)

     Since the data rate from the user programmble MAGELAN or Motorola GPS
cards (and some LORANS) can be set to once a minute or so, this data can be
simply diode-ORed with the TNC output into a single serial port.  In the APRS
single port mode (SPM), APRS can distinguish between packet headers from the
TNC and the unique identifiers of the NMEA data.  The only problems with this
arrangement are data collisions about 1% of the time and ambiguity on
incomming VTG packets.  APRS resolves the $GPVTG position ambiguity problem
by ONLY matching up a VTG sentence if it has been received within 1 second of
a GGA from a known station.

          DIODE OR-ing of GPS and TNC in SINGLE PORT MODE:


    GPS DATA OUT  >----------*------>|--------*----->  TNC RXD
                             |----/\/\/\/\----|
                                              |
    TNC DATA OUT  >----------*------>|--------*        both R's abt 10K
                             |----/\/\/\/\----|


    By January 93, we realized that a simple pushbutton SPDT switch could be
used to alternatively select either the TNC or momentarily a GPS on the same
COMM port.  Since ALL NMEA output GPS devices provide NMEA position reports
at least every 2 seconds, if the operator pressed the button for 2 seconds,
he would be assured of getting a current posit!  W6PNC built a 555 timer to
do this automatically every minute.

   To activate this Single Port Mode (SPM), bring up APRS in one-port TNC mode
being sure to set the TNC to the same BAUD RATE as your GPS.  Then enter the
ALT-S SETUP Menu.  Select SPM under the GPS selection and then do SETUP again
to SAVE the config file.  You will be asked for your regular validation and
your GPS number. If you did this correctly, you will see the lower case (spm)
on the yellow control panel go to uppercase.  ALSO NOTE THAT BOTH THE TNC AND
THE GPS MUST BE RUNNING AT THE SAME BAUD RATE. THIS IS USUALLY 4800 BAUD FOR
NORMAL NMEA OUTPUTS.

   In the Single Port mode, the screen refresh rate is set by the period
programmed into your programmable GPS (45 seconds or so is about right).
The position report transmission rate from APRS to the TNC is set by POS-RATE
command in the SETUP Menu.


HARDWARE SINGLE PORT MODE  (HSP)

     APRS can control the switching of the Single Port Mode between the TNC
and ANY GPS using the handshaking lines of the COMM port and a simple two
transistor switch soldered into the serial port data connector hood.  This
mode is called the HSP mode.  In this HSP mode, APRS periodically toggles the
DTR output of the serial port for a second or so whenever it needs data from
the GPS.  With DTR held high (normal) the GPS data is shunted to GND while
the TNC operates normally.  When APRS toggles the DTR low, this holds off
output from the TNC, but also enables data through the emitter follower from
the GPS.  As soon as APRS receives the GPS data it needs, it restores DTR so
the TNC is connected for normal APRS operations.  In some TNC's, (PACCOMM)
the RTS is used instead of the DTR for holding off TNC data.  Also, this
circuit uses your PC RTS line to derive a cource of +V.  If the impedance of
your PC RTS line is not strong enough, you might need to get it from the TNC's
DSR line.  REMEMBER THAT YOUR TNC AND GPS MUST BE SETUP AT THE SAME BAUD RATE,
usually 4800 baud.

NEWS!  PACCOMM now sells this little circuit assembled inside of DB-9 connector
with two pigtail connectors for your TNC and GPS for about $30.

                              *------------------< RTS (source of +V only)
 GPS NMEA                   |/ c                       (Or get from TNC's DSR)
   >------/\/\/\/---*----*--|
 OUTPUT      1k     |   NPN |\ e     * see important notes below
                    |         *--->|-->|---*-----> RXD
 TNC RXD            |              diode   |               
   >--------------------------*----->|-----*
                    *         |            |       SINGLE
                    |         *---/\/\/\/--*       LAPTOP
                   c \|            10k             RS-232
                      |--*--------/\/\/\/--*       PORT
                   e /| NPN        10k     |
                    |                      |
 TNC DTR (or RTS) ////                     |
   <---------------------------------------*-----< DTR

 TNC TXD
   <---------------------------------------------< TXD
  GND
   *---------------------------------------------* GND

I installed these components in a back-to-back DB-9 connector on the cable
comming from my GPS so that it is always handy.  Almost any NPN transistor and
switching diodes will work.  A 2N2222 is fine.  Notice that a dotted line
shows how to add just one wire to take the output of the TNC to the DGPS
input of the GPS if your GPS is DGPS capable and if someone in your
area is transmitting DGPS data on your packet channel.


PHYSICAL LAYOUT OF BACK-TO-BACK DB-9's WITH HSP CIRCUIT INSTALLED


                1     2     3     4     5   DB-9 FEMALE TO COMM PORT
                O     O     O     O     O
                      |  7  |     |     |
                   O  |  O  |  O  |  O  |
                      |  |  |     |     |
                      |  |  |     |     |
  NMEA      N C------ | -*  |     |     *--------E N
  FROM      P E--->|--*     |     *---- | -/\/\/-B P  (2N2222 or equiv)
  GPS       N B---*-- | --- | --- | --- | -------C N
                  |   |     |     |     |
                  |   *--*  |     |     |
   A >-----/\/\/--*   |  |  |     |     |
                      \  -  |     |     |
   DGPS < - - - - *   /  ^  |     |     |
                  |   \  |  |     |     |
                  |   |  |  |     |     |
                  * - *--*  |     |     |
   B ---------------- | --- | --- | ----*
                      |     |     |     |
                      |     |     |     |
                O 1   O 2   O 3   O 4   O 5   DB-9 MALE TO TNC CABLE

                   O     O     O     O


In this adapter, the voltage to provide the -V bias to convert the NMEA output
to RS-232 levels comes from the output of the TNC.  For this reason, if the
GPS is used alone without the TNC, a jumper must be connected between
pins 2 and 3 of the empty TNC connector.  This takes the -v from the unused
TXD output of the PC.  I recommend carrying a stubby DB-9 female connector
with this jumper permanently installed.

                O 1   O 2   O 3   O 4   O 5   DB-9 FEMALE STUB USED TO PROVIDE
                      |     |                    -V BIAS WHEN TNC IS NOT USED
                   O  |  O  |  O     O
                      |     |
                      *-----*

HSP OPERATIONS:  The set up procedure for HSP is identical to SPM, except that
HSP vice SPM is selected from the SETUP menu.   To activate HSP, bring up APRS in
one-port TNC mode being sure to set the TNC to the same BAUD RATE as your GPS,
probably 4800.  Then select HSP under the SETUP menu and then SAVE a new CONFIG
file.  You will be asked for your validation number and special GPS number.
If everything is done correctly,  you will see the lower case (hsp) on the
yellow control panel shift to uppercase.  In HSP mode both the screen refresh
rate and position transmission rate are set with the POS-RATE command.

* Notice that one or two or NO series diodes in the emiter lead of the GPS 
switching transistor may be required depending on your particular GPS and
PC serial port.  A second diode may be needed if your PC needs to see
a greater negative voltage on the RS-232 input.  The second diode provides
an additional .7 volt drop to a negative 1.4 volts instead of the negative
0.7 volts that the single diode circuit provided.  Since this additional
voltage drop also lowers the maximum positive voltage by the same amount,
do NOT add this diode, unless your PC needs it.  If you are having garbling
problems, try it with and without the second diode.
IF YOU ARE USING A GARMIN 45 YOU MIGHT NEED TO TAKE BOTH diodes out, since
the GARMIN ouputs +/- voltages...


US NAVY MAGNAVOX 1105 SATNAV SYSTEM:

   I did write a version of APRS that is plug compatible with the MAGNAVOX
1105 SATNAV system.  This is a 1970's vintage TRANSIT SATNAV system found on
many US NAVY ships.  If you have use for this module, please contact me.


NOTES ON MOBILE GPS OPERATION:  See the MOBILE.txt file.  Here are some tips:
  * write down your V#'s IN THE CAR!  YOu never know when you may need to
  re-configure your system.
  * Recommend making a trimmed down disk with only the maps you will need.
  This is easy to do now since version 6.0 permits you to change MAPLIST's.
  * When you QUIT APRS, your TRACK HISTORY is NOT saved UNLESS you sepcify a
  file name OTHER than BACKUP.BK (or do a FILE-SAVE).
  * Use the TRACK mode to keep yourself on the map.
  * Set your refresh rate to a long enough time period (20 sesc or more) so
  that APRS is not always processing GPS and has time to service the keyboard.
  * Make notes of any map errors or disagreements with GPS, and when you get
  home, use MAPFIX.bas, to replay your track history and fix the map easily.
  * Use the TIME-SYNC command to sync your PC time to GPS time on the next
  receipt of a GGA or RMC sentence.  This eliminates dead-reckoning errors.

For most highway maps and 1 minute reporting at 60 MPH, zooming in below
eight miles is usually a waste of time.  For this reason don't waste your
time making maps with every little twist and turn in the road; it just takes
time and memory and makes no difference.  A straight line between A and B is
not as pretty, but shows the road as well as 20 points showing all the curves.
If you do save any RAW GPS data outside of the APRS environment, the following
two programs may be useful in reconstructing GPS data.  They are provided
as-is, since I just wrote them for a quick task a long time ago, but thought
they might be useful to others as a basis for writing your own routines.

FILTRHST.bas:  APRS automatically builds a track history for all moving
stations.  APRS avoids saving redundant position reports automatically with
its POS-FILTER.  The default value of the filter is wide enough to include the
variations in position due to GPS selective avaiability. (+/- 0.03 minutes)
With the filter off, this is reduced to 0.01.  FILTRHST.bas can be used to re-
filter a track history file to remove additional points.  Use the source code
to write your own filters for your own needs.  In addition to filtering, this
program can be used to combine a number of separate track history files into
one file.

GPStoHST.bas:  This program will take any DOS text file and generate an APRS
track history file.  It only looks for the GGA and VTG NMEA-0183 sentences
and combines them into the one line APRS format.



STAND-ALONE GPS TRACKERS FOR MOBILES WITHOUT PC's

(Note that this section is somewhat obsolete due to the availability of
cheap handheld GPS's and the PACCOMM TNC or Howie Golsteins ROMs that
make them useable as-is.  BUT for Balloons, and small stand-alone tracking
boxes for taping to the roof of special vehicles for special events, using
the innexpensive OEM cards, is still a viable way to go.

    This method has the advantage of transmitting any of the NMEA-0183
sentences (to include course, speed and altitude) but requires the use of
special programmable GPS/LORAN devices that give the user the ability to
modify the periodicity of the data reported via the interface.  In most
devices, navigation data is continually updated about every two seconds at
4800 baud.  This is far too much data to transmit over a shared AX.25 packet
link.  Fortunately there are a few old LORANS and some OEM GPS cards which
can be configured by the user to output a report once every N minutes or even
hours.

1.    The MAGELAN OEM 5000 circuit board that we initially used as a GPS engine
is no longer available.  It has been replaced by a $295 5 volt/TTL card that
DOES NOT HAVE A NMEA OUTPUT.  This makes the remainder of this section
referring to the MAGELAN OEM card, valuable for historical purposes only.
This card was 3.5 by 7 inchs, cost $445 required only a GPS antenna and 12
volts; it included the RTCM-104 differential correction.  Call Emiel Yakoub
at MAGELAN 960 Overland Ct, San Dimas, CA 91733, phone 714 394-5000.  It had
full user programmability with periods up to 5 minutes maximum.

2.  The Motorola OEM prototype card also has user programmability and includes
the RMC message which contains both position and course/speed in one NMEA
sentence.  Call Jennifer Spitzen at MOTOROLA, 708 480-5699 and ask for the
BASIC ENCORE circuit board.  The card runs on 12 volts, has NMEA 0183 output
and RTCM-104 (differential correction) standard and comes with an active patch
antenna and cable for $480 (gtys 1-99).  Without antenna is $435, but unlike
the Magelan, this card must have the additional 20 dB gain from an active
antenna in front of it to work. It also outputs altitudes to 56,000 feet in
the GGA message.

Unfortunately, they do not include all the DOCS and the user setup software
in the quantity-one shipment.  That costs an additional $1200 for their full
development package.  I wrote a program called MOTOROLA.BAS which will allow
you to send the needed initialization and NMEA timing commands.  This program
will also generate the command to take the OEM card out of its default BINARY
format, and place into NMEA format.

     An automatic vehicle tracking system can be assembled by simply
connecting the RS-232 output from one of these programmable GPS's directly
into the TNC, setting the periodicity to 1 minute or so and selecting only
the RMC or GGA/VTG sentences to be output.  The TNC must be placed in UNPROTO
CONVERSE, and from then on, every minute a GPS position report will be
transmitted.  The APRS software decodes raw NMEA data off-the-air in addition
to the defined APRS formats.

MAGELAN CARD OPTIONS:   The $60 Magelan development kit consisted of PC setup
software, manual, a wall power supply, RS-232 cable, and short SMB to TNC
adapter cable.  Their $130 external active "egg" antenna came with 18 ft of
cable.  They also offered a $60 passive antenna with a 6 inch SMB pigtail.
Only 12 volts and RS-232 need to come between the GPS and your TNC or PC.

GPS ENGINE SET UP:  Follow all manufacturer instructions for initializing your
GPS engine using your PC and their setup program.  After the system is running
and producing fixes, send commands to enable GGA/VTG or RMC data between
30 to 120 seconds using the following commands:

MAGELAN COMMANDS:
$PMGLI,00,B00,7,A  (for GGA GPS position only)       Where 6 = 30 Secs
$PMGLI,00,B01,7,A  (for GLL LORAN position only)           7 = 1 Minute
$PMGLI,00,EOO,7,A  (for course and speed with either)      8 = 2 Minutes
                                                           9 = 5 minutes

     Each line must end with a carriage return-linefeed.  The GPS engine
gives no responses to commands, other than doing what it is commanded.  You
might try a value of 5 which is once every 10 seconds as a test to be sure
the GPS card is recognizing your commands.  The commands for the MOTOROLA
card are similar, but MUST have the proper checksum.  Use my MOTOROLA.BAS
program to send these commands with proper checksum calculated...

MOTOROLA COMMANDS:
$PMOTG,GGA,0030*csCRLF (sets up GGA once every 30 secs)
$PMOTG,RMC,0060*csCRLF (sets up RMC once every 60 secs etc..)

BATTERY BACKUP:  Be sure to add the battery back up supply so that the card
can be turned off without having to re-initialize every time.  Each of the
cards has a connection for a 3.6 volt battery.  I use 3 AA cells soldered
together.   3 volt cells are NOT enough.  DO NOT EXCEED 5 VOLTS!

TNC SETUP DETAILS:  If your OEM card does NOT output the RMC sentence, (such
as the Magelan), and you want course and speed, you must use the GGA and also
the VTG sentence.  These two sentences are separated by enough time that the
TNC usually generates two packets, one right after the other.  This is a
problem if a digipeater path is used, because the digipeater will begin
digipeating the first position fix packet and cover up the trailing velocity
packet.  To solve this problem, (not needed for balloons which dont need
digipeaters), the sending TNC needs to be instructed to send packets not on
receipt of every carriage return, but on a timing function.  Set CPACTIME ON
and change the SENDPACK character from $0D to anything else (say $01).  This
way, both the position fix and velocity lines will be sent together in the
same packet one second after the last character is received from the GPS.
This packet, containing two frames, will then be digipeated all together by
the digipeater with no break in between.  If you use the Motorola card,
with the RMC sentence, this double packet problem does not exist.

LINEFEEDS and FLOW CONTROL:  Since the GPS is sending each line with a CR/LF
on the end, your TNC will always end up placing the superfluous linefeed at
the beginnning of the next packet.  To defeat linefeeds, set LFIGNORE on.
(for the non-standard TNC products, try the Linefeed Supress, LFS ON)
Similarly, your terminal program must send CR-LF on each command to the GPS
card.  When you try to talk to your TNC with CR-LF, you will experience a
lockup condition since the extra LF will look to the TNC like the beginning
of a new command line and will hold off all TNC output.  To overcome  this
problem, set FLOW OFF.  Here are the commands which must be changed from
factory defaults for most TAPR-2 TNC's:

  ECHO OFF,  FLOW OFF,  LFIGNORE ON,  CPACTIME ON, SENDPAC $01

(Remember that you have SENDPAC set to $01, and change it back to $0D for
normal packet operations!   I was pulling my hair out while driving through
Knoxville and trying to connect to the local node.  It would ignore all of my
node commands as if I was personna-non-grata!  I finally realized it didn't
like the $01's being imbedded in my packets!)

UNPROTO-CONVERSE-MODE:   And now for the last problem; keeping the TNC in
converse mode.  Since TNC's always default to command mode when turned on,
they cannot be expected to operate autonomously with GPS data supplied to
their inputs from power up.  Someone has to always issue the command to place
them into CONVERSE.  PACCOMM has solved this problem with their UI MODE
command.  AEA also has a bit that you can select that will set up the UI mode.
With UI MODE ON, the TNC powers up in CONVERSE and is always ready to transmit
raw data on its input as UI packets.  DRSI also sells a special APRS ROM that
always starts up in CONVERSE.  If you hit ctrl-c with either of these TNC's
you get instantly to command mode for normal operations.


DUMB TERMINAL SETUP:  So I can see the command that I am typing into the GPS
card, I configure my terminal device as half duplex.  The GPS also needs the
CR/LF sequence at the end of each command, so I set the terminal to translate
CR to the CR/LF sequence.  In order to use the same terminal with the TNC,
then, that is why I turn ECHO and FLOW off in the TNC.  I wired my GPS/TNC box
with one DB-9 serial connector and two switches to select whether the terminal
is talking to the GPS or the TNC, and the second switch to enable the data
output from the GPS to go into the TNC after all configuration is complete.

SYMBOLS:  APRS has more than 40 different symbols.  To make a simple TNC/GPS
tracking combo specify its own symbol character, I have devised two methods.
First, when APRS receives a raw NMEA position report over the air, it will
use one of 15 default symbols based on the callsign SSID.  See SYMBOLS.txt.
Secondly, any of the APRS symbol designation characters can be placed at the
beginning of the TNC BText surrounded by {} braces.  Once the BText with that
symbol is received, the station will then appear with the proper display
symbol.

OPERATION:  With the special UI MODE start-up ROM, and after initialiation
the other TNC parameters once, all future tracking evolutions are initiated
by simly applying power to the GPS/TNC/Radio.  Without the special ROM,
however, every tracking evolution requires applying power, turning on a dumb
terminal, and sending the TNC CONV command.  Then the terminal can be removed
or turned off until the next power up.  If you do not have the UI MODE ROMS,
be sure to use a power source that can NEVER glitch!  At the first bump,
you may see the TNC reset and you are off the air until the race is over!


We have assembled a nmumber of these GPS/PACKET tracking devices.  In fact,
the small OEM cards can be included within some of the larger TNC enclosures.
THen add two switches to the front panel to select whether the external
terminal device is talking to the GPS or TNC, and to enable or disable GPS
packet reporting.  Other smaller packages have been made using the PACCOM and
DRSI TNC's and the TTL only model of the OEM cards, but I shy away from the
TTL versions for the casual experimenter because of the absence of any data
or power supply buffering.  One wiring error or static charge and you have
blown a $395 card!

MOST OF THIS TEXT AND THE HOOK-UP SCHEMATICS WERE PUBLISHED
IN THE FEB 94 ISSUE OF QEX.


BUILDING A STAND-ALONE TRACKER WITH ONLY A 5 VOLT TTL OEM GPS UNIT:

   Building a tracker out of a 5 volt TTL GPS and any of the TAPR-2 CLONE TNC's
is trivial.  In the PACCOMM TINY-2, MFJ-1274, and DRSI-DPK2 there is a diode
in the TXD circuit to provide isolation between the RS-232 converter chip and
the TTL modem disconnect header.  This diode is labeled D7, CR22, and D12
respectively.  By providing the GPS TTL data output to the RXDB line (pin 5)
of the modem disconnect header (via a reverse biased diode) the GPS NMEA
data will be transmitted by the TNC.  Similarly, by taping off of the cathode
of this diode, the TTL data from an attached terminal can be sent to the GPS
input.  With the TNC in converse mode, setup commands from the terminal are
not only transmitted on the air (without confusing the TNC) but also sent to
the GPS unit.  Conversly, GPS data is always transmitted on the air, but if
ECHO is on in the TNC, then the GPS output is also echoed back out to the
attached terminal!  In this manner, no external switches are required to
switch between talking to the GPS unit and the TNC.  Of course, the GPS sees
everything sent from the terminal, but will IGNORE everything that does not
match a GPS setup command.



CONCLUSION:  With the cost of GPS OEM cards falling below $299 in the summer
of 94 and handhelds falling below $399, there is every reason to begin
considering GPS applications in Amateur Radio.  At your next club budget
meeting, instead of throwing another $400 at the repeater monster, buy the
components to build a GPS/TNC tracking device into a cigar box size package.
Then at all future public service events, you have a package with whip
antenna on top that can be duck-taped to the top of any vehicle for automatic
vehicle tracking.  Let your imagination roam!


OTHER EXPERTS OR APRS USERS THAT HAVE GPS INTERFACES RUNNING:

WB4APR Bob Bruninga. Annapolis.
W3IWI  Tom Clark. AMSAT GURU working on GPS for Satellites. Uses Motorola
N3MNT  Bob Boltz. Annapolis MD. Has MAGELAN GPS/TNC mobile
W8RIK  Joe Hussy. Columbus OH
N6JSX  Dale Kubicheck Works at MAGELAN! San Dimas, CA
W1BEL  Gwyn Reedy. Tampa. PACCOM makes commercial TNC/GPS automatic combo
W9LZQ  Kent Helman, Onalaska WI. He did map of WI!
W1KRU  Jim Warakouis. WestRoxbury MA.
WB6LPG Bill Bliss. HalfMoonBay CA.
N5SSY  Ross Mocklin.  NewOrelans LA.
KD1E   John Moore. GPS mobile at GM Proving Ground. @ N8NNN.#SEMI.MI
...
A total of 20 APRS/GPS mobiles were tracked in-and-around DAYTON, 1994!




DIFFERENTIAL CORRECTION

Tom Clark (W3IWI) experimented with a Differential GPS xmtr in the Wash DC
area transmitting 30 second DGPS data on the APRS freq.  APRS GPS mobiles can now
obtain accuracies to 5 meters or so.  We are pleased to report that the RTCM-
104 format works perfectly well with APRS and with TNC's:

*  The GPS rcvrs seem to ignore the packet headers and act on the RTCM data
*  The RTCM gybrish is all printable ASCII and does not garble APRS screens

Although this is an excellent demonstration and there are surely HAM
applications that can take advantage of the DGPS accuracy, APRS is probably
not one of them.  First, APRS is not concerned with NAVIGATION accuracy,
because  a) no maps are that accurate (with DGPS you can make 'em so!), and
b) the purpose of APRS is to inform others of mobile locations over a wide VHF
area, NOT to the nearest 15 feet.  (APRS formats do maintain positions to 60
foot precision)  Secondly, A mature APRS net involved in a special event or
activity, can probably NOT handle the QRM from 30 second RTCM transmissions.
In the long term, the DGPS data should probably be transmitted MORE OFTEN and
on another frequency, OR be remotely controlled such that it can be requested
by a mobile user on demand, but silenced most of the time.  Transmitting less
often is meaningless due to latency of the data.  The only application of DGPS
that I can think of is to keep track of golfcarts at a hamfest, and be able
to see who's booth they are at.  I will probably incorporate a ?RTCM? format
in APRS to permit stations to request DGPS data.

I am not negative about this at all, I am only pointing out that there is NO
need for you to feel that you need to rush out and implement a DGPS system
in your area for APRS.

DGPS TRANSMITTER SET UP:  Set your TNC to transmit TO DGPS instead of the
usual TO APRS and set up whatever UNPROTO path is desired to cover the area.
Then enter the location of the DGPS transmitter into the TNC BText in the
usual format making sure to use the special (.) symbol in the symbol field:

  BT !3859.11N/07629.11W.RTCM transmitter operated by TOM W3IWI...

Everything after the (.) symbol character is free text.  APRS will flash a
DGPS flag on the screen each time it hears a DGPS transmission, but will not
add the station to the L or P-Lists unless it also sees the (.) symbol in the
position report.  Set your beacon to every half hour or so.  Finally, set your
TNC into CONVERSE and tell your RTCM-104 DGPS receiver to output once every
30 seconds.

See the new HSP mode schematic above where I added the interface wire between
your TNC and GPS for automatic DGPS operations.

CONFIGURING FOR DGPS:  There are two options for routing the DGPS data from
your TNC to your GPS unit:  1) For ANY arrangement: run an external wire from
your TNC RXD data output over to your GPS DGPS data input.  2) For dual port
operations only:  connect your GPS DGPS input to the PC serial port TXD line
and select DGPS from the SETUP menu in order to enable DGPS data output from
APRS.
CAUTION:  This will not work if you are operating in the SPM or HSP modes or
if you are using the same serial port TXD output as a source of -V bias for
the NMEA conversion as suggested in the above paragraphs.

