8,567
edits
Oschroeder (talk | contribs) (Created page with '== The Header == All messages contain XDR encoded data and have a well defined header which looks like this: |'''Magic'''|'''Version'''|'''MsgId'''|'''MsgLen'''|'''ReplyAddress…') |
m (Line endings) |
||
Line 1: | Line 1: | ||
== The | == The header == | ||
All messages contain XDR encoded data and have a well defined header which looks like this: | |||
|'''Magic'''|'''Version'''|'''MsgId'''|'''MsgLen'''|'''ReplyAddress'''|'''ReplyPort'''|'''Callsign'''|'''Data'''| | |||
|'''Magic'''|'''Version'''|'''MsgId'''|'''MsgLen'''|'''ReplyAddress'''|'''ReplyPort'''|'''Callsign'''|'''Data'''| | |||
{| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | {| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|MsgId: | |MsgId: | ||
|4 bytes, defines what data is appended to the header. | |4 bytes, defines what data is appended to the header. Can be 0x00000001 for chat messages (deprecated) or<br> | ||
Can be 0x00000001 for chat messages (deprecated) or<br> | 0x00000007 for position data<br>all other values are outdated and ignored | ||
0x00000007 for position data<br> | |||
all other values are outdated and ignored | |||
|- | |- | ||
|MsgLen: | |MsgLen: | ||
Line 33: | Line 29: | ||
|} | |} | ||
== Data of chat messages == | |||
The data for chat messages is a zero terminated array of characters. The MsgLen field in the header represents its length. The maximum length is defined to be 256 bytes. | |||
== Data of | == Data of position messages == | ||
The data of position data is more complicated and looks like this: | The data of position data is more complicated and looks like this: | ||
{| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | {| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | ||
|ModelName | |ModelName | ||
|96 bytes, zero terminated array of characters representing the | |96 bytes, zero terminated array of characters representing the aircraft model used by the user | ||
aircraft model used by the user | |||
|- | |- | ||
|time | |time | ||
Line 63: | Line 52: | ||
position wrt the earth centered frame | position wrt the earth centered frame | ||
|- | |- | ||
|OriX || 4 bytes, XDR encoded float value, X-orientation of the user | |OriX || 4 bytes, XDR encoded float value, X-orientation of the user wrt the earth centered frame, stored in the angle axis representation where the angle is coded into the axis length | ||
wrt the earth centered frame, stored in the angle axis | |||
representation where the angle is coded into the axis length | |||
|- | |- | ||
|OriY || 4 bytes, XDR encoded float value, Y-orientation of the user | |OriY || 4 bytes, XDR encoded float value, Y-orientation of the user wrt the earth centered frame, stored in the angle axis representation where the angle is coded into the axis length | ||
wrt the earth centered frame, stored in the angle axis | |||
representation where the angle is coded into the axis length | |||
|- | |- | ||
|OriZ || 4 bytes, XDR encoded float value, Z-orientation of the user | |OriZ || 4 bytes, XDR encoded float value, Z-orientation of the user wrt the earth centered frame, stored in the angle axis representation where the angle is coded into the axis length | ||
wrt the earth centered frame, stored in the angle axis | |||
representation where the angle is coded into the axis length | |||
|- | |- | ||
|VelX || 4 bytes, XDR encoded float value, velocity of the user in X direction | |VelX || 4 bytes, XDR encoded float value, velocity of the user in X direction wrt the earth centered frame measured in the earth centered frame | ||
wrt the earth centered frame measured in the earth centered frame | |||
|- | |- | ||
|VelY || 4 bytes, XDR encoded float value, velocity of the user in Y direction | |VelY || 4 bytes, XDR encoded float value, velocity of the user in Y direction wrt the earth centered frame measured in the earth centered frame | ||
wrt the earth centered frame measured in the earth centered frame | |||
|- | |- | ||
|VelZ || 4 bytes, XDR encoded float value, velocity of the user in Z direction | |VelZ || 4 bytes, XDR encoded float value, velocity of the user in Z direction wrt the earth centered frame measured in the earth centered frame | ||
wrt the earth centered frame measured in the earth centered frame | |||
|- | |- | ||
|AV1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional | |AV1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional angular velocity vector<br> | ||
angular velocity vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|AV2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional | |AV2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional angular velocity vector<br> | ||
angular velocity vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|AV3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional | |AV3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional angular velocity vector<br> | ||
angular velocity vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|LA1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional | |LA1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional linear accelaration vector<br> | ||
linear accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|LA2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional | |LA2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional linear accelaration vector<br> | ||
linear accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|LA3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional | |LA3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional linear accelaration vector<br> | ||
linear accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|AA1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional | |AA1 || 4 bytes, XDR encoded float value, 1. part of the three dimensional angular accelaration vector<br> | ||
angular accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|AA2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional | |AA2 || 4 bytes, XDR encoded float value, 2. part of the three dimensional angular accelaration vector<br> | ||
angular accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
|AA3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional | |AA3 || 4 bytes, XDR encoded float value, 3. part of the three dimensional angular accelaration vector<br> | ||
angular accelaration vector<br> | |||
wrt the earth centered frame measured in the earth centered frame | wrt the earth centered frame measured in the earth centered frame | ||
|- | |- | ||
Line 123: | Line 94: | ||
|} | |} | ||
This data is followed by '''property-values''', which are encoded in the form | This data is followed by '''property-values''', which are encoded in the form '''ID'''|'''Value''' | ||
'''ID'''|'''Value''' | |||
The following properties are transmitted, but not necessarily all present and not in this order: | |||
{| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | {| class="prettytable" border="1px" cellspacing="0" cellpadding="2" | ||
!ID !! Property || Type(*) | !ID !! Property || Type(*) | ||
Line 437: | Line 406: | ||
(*) The types are XDR encoded as follows: | (*) The types are XDR encoded as follows: | ||
INT 4 bytes, send unconditionally | |||
INT 4 bytes, send unconditionally | |||
FLOAT: 4 bytes, send unconditionally | FLOAT: 4 bytes, send unconditionally | ||
BOOL: 4 bytes, send unconditionally | BOOL: 4 bytes, send unconditionally | ||
STRING [LEN|STR|PAD]: send only when length > 0 | STRING [LEN|STR|PAD]: send only when length > 0 | ||
LEN: 4 bytes, length of the string | LEN: 4 bytes, length of the string | ||
STR: n bytes, string string itself | STR: n bytes, string string itself | ||
PAD: n bytes, padding so the overall length is a multiple of 4 | PAD: n bytes, padding so the overall length is a multiple of 4 |