YES, Phenix pro using mavlink, then I will introduce a little mavlink agreement, the following are described mavlink v1.0 version.
Mavlink first briefly under the agreement. The Mavlink protocol was first released in 2009 by Lorenz Meier of the Federal Institute of Computer Vision and Geometry of the ETH Zurich and follows the LGPL open source agreement. The Mavlink protocol is a higher level open source communication protocol based on serial communication. It is mainly used in micro aerial vehicle communication. Mavlink is a transmission and reception rule for the data often used by small aircraft and ground stations (or other aircraft) to communicate with them and incorporates checksums.
1.Mavlink sent by the data structure. Mavlink transmission of the basic unit is the message frame.
As shown in the figure, each message frame is constructed as described above, with the exception of gray, the other lattices represent one byte of data.
Red is the start flag (stx), in v1.0 version with "FE" as the starting flag. This flag is useful for message decoding at the mavlink message frame receiver.
The second cell represents the byte length (len) of the gray portion (payload, called payload, data to be used in the payload), ranging from 0 to 255. The receiver at the mavlink message frame can compare it to the length of the payload actually received to verify that the length of the payload is correct.
The third cell represents the sequence number (seq) of the current message frame. Each time a message is sent, the contents of the byte are incremented. This sequence number is used by the mavlink message frame receiver to calculate the message loss ratio, which is equivalent to the signal strength.
The fourth cell represents the system number (sys) of the device sending the message frame. The default system number is 1 when PIXHAWK is used to PX4 firmware, which is used by the receiving end of the mavlink message frame to identify which device sends the message.
The fifth cell represents the unit number (comp) of the device that sent the message frame. The default cell number is 50 when using PIXHAWK to PX4 firmware. For the mavlink message frame, the receiving end recognizes which unit of the device is sending the message Temporarily no use).
The sixth cell represents the number of the message packet in the payload (msg). Note that it is different from the sequence number. This byte is important. The mavlink message frame receiver uses this number to determine what message is in the payload. Packet and according to the number corresponding to select the way to deal with the payload packet.
The last two bytes are the 16-bit parity bit, ckb is the upper eight bits, and cka is the lower eight bits. Check code from the crc16 algorithm, the algorithm will be the entire message (from the start bit to the end of the payload, but also additional MAVLINK_CRC_EXTRA bytes) crc16 calculation, a 16-bit checksum. The MAVLINK_CRC_EXTRA is generated by the xml file that generated the mavlink code, and the extra thing is added to the MAVLINK_CRC_EXTRA for each packet in the payload of each of the previously mentioned payloads (indicated by the message packet number) When the mavlink protocol is used for different versions of the aircraft and ground stations, the checksums calculated by the two parties will be different so that the mavlink protocols between the different versions will not work together and avoid the significant potential for communication between different versions problem.
For convenience of description, a message packet will be referred to as a packet, and the information represented by the packet will be referred to as a message. The sys in the figure above will be called sysid, comp will be called compid, and msg will be called msgid.
The official description is as follows: