                     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 some fields may differ after the 5th or 6th
significant digit.  This is because the "chinalake" may have
used a different satellite (having a slightly different version
of the alamanc) that has been updated at a different time to the
one you happened upon. The differences do not impact on the
quality of the produced TLE. Other factors (like the changing
RAAN) is of far greater impact.  The line beginning "Rate of
Right Ascen(r/s):" is not used in the maths, this field can
change at about the 2nd significant digit. It is assumed that
the slightly different almanacs reflect different ages of
updating, therefore better defined orbits!

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.


MOT2ALM.EXE Revised: June 2000

Added code to decode the 6 bit health status, to decide when a
SV is actually in service or not.
