Aircotec protocol description
As there is no publicly available source of Aircotec protocol, I tried
to decipher some parts of it. I have updated this document with information
I received from Aircotec.
Tracklog transfer - MXP protocol
Aircotec communicates on 57600 or 9600 with 8N1 COM port settings. There
are currently 3 protocols supported - TNC, PWC and MXP. I decided to use
the MXP protocol, because it supports interval of 1 second and it seems
to be somewhat simpler than TNC.
The MXP is an ASCII, line-oriented protocol. Lines are separated by
a CR/LF (0x0D 0x0A) characters. Two different line types are sent - header,
which is the first line that is sent upon transfer, followed by several
point data lines.
The line looks like this:
Let's break it up into the parts:
(char): Type of GPS. 'xc' for XC trainer, 'tn' for Top-navigator.
(hexadecimal): Version. In this case: 2.4-05 for XC trainer,
v.2405 for TN.
(hexadecimal): Serial number.
(hexadecimal): Flight number mod 256.
(decimal): Time of the first point in tracklog (UTC).
: Geodetic datum, always 1 means WGS-84.
(hexadecimal): Count of points that will be sent following header.
(hexadecimal): Interval in seconds between points. It was chosen
by the user when sending the tracklog on the device.
(hexadecimal): Control code.
XOR of all characters before the control code.
(*|0|1|2): Type of height that will be sent:
- * (older version) or 0 - baro height
- 1 - GPS height
- 2 - both baro and GPS height
The header is followed by several (exactly 'PPPP') lines. Each line looks like
All fields are in hexadecimal format.
: Line number, starts from 0, is incremented with each line.
: Number of seconds elapsed from the beginning of tracklog.
'TTTT'+'tttt' is the time of the point.
: Flags. Bit-wise OR of following values:
For XC: 0x01 - the GPS had sattelite signal, 0x02 - 3D fix, 0x80 - Mark
For TN: 0x01 - GPSspeed/course valid, 0x02 - always 0, 0x80 - Mark
: Latitude. Divide the number by 24000.0 to get degrees.
(2's complement format for negative numbers).
: Longitude, same format as latitude.
: Altitude in meters. (2's complement format for negative numbers).
: Control code. XOR of all characters before the Control code.
When both GPS and baro height are sent, the aaaa
instead with GPS height first and baro height second.