                     mot2alm.exe

A utility that, assuming a PC is connected via a serial link to
a Motorola Oncore series GPS, will request the almanac and then
convert this to a YUMA format file.  It will then call "alm2tle"
to convert the YUMA file to the TLE format that can be used on
your favourite satellite tracking software.

N.B. Your GPS unit should have been receiving a good signal for
at least 15 minutes prior to downloading the almanac. It takes
this long for the almanac for all satellites to be transmitted
in the navigation message.

Usage:

mot2alm <COMPORT (1 or 2)> <EXIT RCVR Mode (0 or 1)>

COMPORT = The serial port your GPS is connected to (1 or 2)

EXIT RCVR Mode = If set to 1 will leave the GPS in 4800 NMEA
mode, if 0 will leave RCVR in native 9600 binary mode.

For example:   mot2alm 2 1

Will use comport 2, and after downloading almanac will switch
RCVR to 4800 NMEA, thus restoring on the serial connection
whatever setting you have previously set for the NMEA output.
Note, the GPS can be left in NMEA 4800 mode, mot2alm will switch
the RCVR from 4800 to 9600 for downloading the almanac.

I have a shortcut on my desktop that calls the following batch
file, so with a click of the mouse, I can download the almanac
and convert to TLE format and copy the new file to appropriate
directories.

TLE.BAT
-------
mot2alm 2 1
copy gps.tle d:\stsplus\gps.tle
copy gps.tle d:\trakstar\gps.tle

As long as ALM2TLE is in the same directory, it will be called
from MOT2ALM and produce GPS.TLE. This file contains the Two
Line Keplerian info that can be used in your favourite satellite
tracking software.

To test that everything is OK, you can check the YUMAx.TXT
output file against the following file:

ftp://sirius.chinalake.navy.mil/pub/nawc/local_almanac/almanac.yuma

This "chinalake" file is updated hourly. When comparing the navy
file against the output of mot2alm, make sure that the week
numbers and the Toa (Time of Applicability) are the same,
otherwise you will be comparing different orbits.

When comparing your locally made YUMA file with the "chinalake"
file, you may notice on fields that have an angular measure,
they can differ after the 5th or 6th significant digit. This
does not occur with the Coast Guard files. It would seem the
"NAWC Receiver" is using a truncated form of PI.  The value used
in mot2alm is the GPS value of 3.1415926535898, also all the
calculations in mot2alm use "double" precision. As far as
accuracy is concerned, the Coast Guard Almanac is giving 11
digits of accuracy, the NAWC about 6.
At time of writing anyway ;-)

A NEW almanac is updated to the GPS satellites about once a day,
so there is no need to get one with greater frequency than that!

Mot2alm certainly works for me with a Motorola GTPLUS receiver.
It may work on other MOTOROLA GPS receivers that use the "@@Be"
command to request the almanac. Because it connects via RS232,
you cannot harm anything to try.

See alm2tle.TXT for further info on the conversion process.

Anyways, have fun and learn with the output TLE.
