APRS Mic Encoder Message Formats
Contributed by Alan Crosswell, N2YGK.
This is DRAFT documentation of equipment under beta test
and may not be correct or may be subject to change. Revised 4/25/97
for Rev. 1 changes.
Overview
This chapter describes the on-air protocol used by the APRS Mic Encoder.
You don't need to read it unless you are writing software to decode
Mic Encoder packets, for example.
Reference is made to the AX.25 standard,
AX.25 Amateur Packet-Radio
Link-Layer Protocol
Version 2.0, October 1984 which is available at
http://www.tapr.org/tapr/html/ax25.html.
The APRS Mic Encoder compresses the APRS position report and message
bits into the destination address and information fields of a standard
AX.25 UI (unproto) frame.
Although the destination address appears to
be quite unconventional, it is a valid AX.25 address, consisting only
of printable (shifted) 7-bit ASCII values. The result of this compression
is a frame 232 bits long (plus any sync characters sent for TXdelay)
which contains:
- Transmitting station's callsign and secondary station ID (SSID);
- Latitude & Longitude in
degrees, minutes, and hundredths of minutes;
- Bearing in degrees;
- Velocity in MPH;
- Three binary message bits (8 values)
- A display symbol code (e.g. car, truck, RV, etc.); and
- A specially encoded digipeater path (only understood by
"APRS SSID digipeaters").
To this basic message, the following additions are sometimes made:
- [+40..88 bits] Two or five 8-bit analog telemetry values (analog-to-digital
values ranging from 0..255).
- [+N bits] Arbitrary beacon text.
- [+56..336 bits] Conventional (non-SSID) digipeater list ("VIA" path).
Figure 1 shows the basic AX.25 UI frame. Figures 2 and 3 describe the
special encoding.
Flag
|
Address
|
Control
|
PID
|
Info
|
FCS
|
Flag
|
01111110
|
112/560 Bits
|
00000011
|
11110000
|
72...N Bits
|
16 Bits
|
01111110
|
|
(see Fig. 2)
|
UI
|
no level 3
|
(see Fig. 3)
|
|
|
Fig. 1 -- Mic-E UI frame
Destination Address
Callsign: Latitude & msg, etc. bits |
SSID |
Ar1DDDD0 |
Br1DDDD0 |
Cr1MMMM0 |
Nr1MMMM0 |
Lr1HHHH0 |
Wr1HHHH0 |
CrrSSID0 |
Fig. 2 -- Destination Address Encoding
Since the MIC-E is transmitting unconnected (broadcast) AX.25 frames,
the destination address does not have to be a callsign-SSID as is
required for connected-mode (two-way station-to-station) communications.
Conventional APRS transmissions set the destination address to a generic
broadcast callsign such as APRS. The MIC-E compressed transmission instead
makes good use of these seven bytes by embedding the latitude and various
flag and message bits as follows:
- Six binary decimal latitude 4-bit nibbles giving degrees, minutes,
& hundredths of minutes (DDDD DDDD MMMM MMMM HHHH HHHH).
- [ABC] Three message bits, complemented (e.g. message 5 is 010).
- [N] Northern/Southern latitude bit (N = 1, S = 0).
- [W] Eastern/Western longitude bit (W = 1, E = 0).
- [L] 100's of longitude degrees (L = 1 means add 100 degrees to
longitude in the Info field.)
- [C] Command/Response flag (see AX.25 specification).
- [r] reserved for future use.
- [SSID] AX.25 SSID, interpreted as :
0 | Use conventional digipeater path, if any. |
8 | North path |
1 | WIDE-1 omnidirectional flooding |
9 | South path |
2 | WIDE-2 |
10 | East path |
3 | WIDE-3 |
11 | West path |
4 | WIDE-4 |
12 | North path + WIDE |
5 | WIDE-5 |
13 | South path + WIDE |
6 | WIDE-6 |
14 | East path + WIDE |
7 | WIDE-7 |
15 | West path + WIDE |
Information Field
The Information field (text) is used to complete the position report
that was begun in the destination address. The encoding used is different
from the destination address since the content is not constrained to be
printable, shifted 7-bit ASCII, as it is in the address. However,
full 8-bit binary is not used: all values are offset by 28 and
further operations (described below) are performed on some of the values
to make the data close to if not completely printable ASCII. This enables
one to use a TNC in MONitor mode to display the data without
confusion over whether a carriage-return is part of the data or the end of
line. Also, software that suffers from the limitations of only accepting
7-bit printable ASCII is accommodated.
NOTE: If the first character of the information field is not one of
the four valid MIC-E flag characters (1Ch, 1Dh, 60h or 27h),
then the frame is not a MIC-E compressed
report and must be interpreted as a conventional AX.25 packet.
MIC-E mandatory Information Field data bytes |
flag |
Longitude |
Speed & Course SPD & CSE |
symbol |
table |
F |
D+28 |
M+28 |
H+28 |
SP+28 |
DC+28 |
SE+28 |
$ |
T |
Fig. 3a -- Information Field Encoding: Mandatory fields
The information field is encoded as follows:
- [F] Mic-E flag, one of:
60h | GPS data is valid. |
27h | GPS data is old. |
1Ch | GPS data is valid (Rev. 0 beta units only) |
1Dh | GPS data is old (Rev. 0 beta units only) |
- [D + 28] Binary degrees of longitude. To decode:
- subtract 28
- subtract 80 if 180 <= D <= 189
- or, subtract 190 if 190 <= D <= 199
- if the [L] bit is set, add 100 to get final value of longitude.
- [M + 28] Binary minutes of longitude. To decode:
- subtract 28
- subtract 60 if M > 60
- [H + 28] Binary hundredths of minutes of longitude. Note that
00..03 hundredths will be unprintable.
The speed and course bytes are packed binary-coded decimal. After
first subtracting 28 from the byte, each
4-bit nibble contains a single digit of the course or speed.
- [SP + 28] First part of speed in MPH. Subtract 28 and multiply by 10.
- [DC + 28] Second part of speed and first part of course. Subtract 28
and divide by ten. Quotient is units of speed. Remainder is hundreds of
degrees.
- [SE + 28] Second part of course in degrees. Subtract 28, the add
to remainder, above.
Finally, make these course and speed adjustments:
- If speed > 800 MPH, subtract 800.
- If course > 400, subtract 400.
The remaining fields are:
- [$]Symbol to use (see APRSdos README\SYMBOLS.TXT)
- [T] Primary/alternate symbol table flag (Rev. 1 and higher only), one of:
2Fh | Use primary APRS symbol table. |
5Ch | Use alternate APRS symbol table. |
The information field is optionally extended either with telemetry values
or comments/btext. If the next byte is one of the flag characters
(60h, 27h, 1Dh), then it contains telemetry.
MIC-E optional Information Field data |
optional telemetry (follows mandatory data) |
flag |
Telemetry |
F |
11 |
22 |
33 |
44 |
55 |
Fig. 3b -- Information Field Encoding: Optional telemetry
The flag is one of:
60h | 2 printable hex telemetry values follow (channels 1 and 3). |
27h | 5 printable hex telemetry values follow. |
1Dh | 5 binary telemetry values follow (Rev. 0 beta units only) |
Each telemetry value is a 2 digit printable hex representation of a
binary value ranging from 0..255. For example, 254 is represented
as `FE'. (Except Rev. 0 beta units.)
For comments/btext, the remainder of the information field simply contains
textual data as configured by the MIC-E user. You can put in a standard
APRS-formatted comment (see APRSdos README\PROTOCOL.TXT) which will cause
the APRS display software to override any position data the Mic-E has
encoded. This is most useful if you are using a Mic-E without a GPS.
MIC-E optional Information Field data |
optional comments/btext (follows mandatory data) |
comments or btext |
Fig. 3c -- Information Field Encoding: Optional comments