qgroundcontrol开发者文档中说明了qgc中的各个链路流向在文档中说明的很清楚,下面配套源代码进行讲解整个qgc地面站的数据流向过程.

qgroundcontrol通信
在 https://dev.qgroundcontrol.com/en/communication_flow.html 中描述如下
Description of the high level communication flow which takes place during a vehicle auto-connect.
LinkManager always has a UDP link open waiting for a Vehicle heartbeat
LinkManager detects a new known device (Pixhawk, SiK Radio, PX4 Flow) connected to computer
Creates a new SerialLink connected to the device
Bytes comes through Link and are sent to MAVLinkProtocol
MAVLinkProtocol converts the bytes into a MAVLink message
If the message is a HEARTBEAT the MultiVehicleManager is notified
MultiVehicleManager is notifed of the HEARTBEAT and creates a new Vehicle object based on the information in the HEARTBEAT message
The Vehicle instantiates the plugins which match the vehicle type
The ParameterLoader associated with the vehicle sends a PARAM_REQUEST_LIST to the vehicle to load params using the parameter protocol
Once parameter load is complete, the MissionManager associated with the Vehi