Skip to main content

Data Transmission

1. Overview

Payload devices and aircraft use a data transmission module to transmit control commands between PSDK and MSDK through a transparent transmission mode over the control command transmission channel. Data, including control commands and user-defined data, can be transmitted transparently between PSDK and MSDK over the data transmission channel. By using the data transmission feature, you can not only set the proportion of bandwidth occupied by different types of data but also monitor the status of various data transmission channels.

Note:

  • The data transmission module in PSDK transmits data transparently between payload devices, onboard computers, and aircraft. It supports users to design custom data transmission protocols based on actual use cases, allowing payload devices developed with PSDK to communicate with mobile apps or onboard computers in a more complex way.

2. Basic Concepts

Channel Classification

Based on the type of data transmitted and its function, the data transmission channels in PSDK can be divided into command signal transmission channels and high-speed data transmission channels:

  • Command Signal Transmission Channel: Highly reliable, dedicated to transmitting signals that require high reliability, such as control commands and status information.
  • Data Transmission Channel: Has a larger bandwidth and is primarily used for transmitting large amounts of data that require high real-time performance, such as radar signals and point cloud data.

Channel Bandwidth

  • Channel Bandwidth: The amount of data that can be transmitted by the data channel under ideal conditions.
  • Real-time Bandwidth: The theoretical amount of data that the data channel can transmit under operational conditions.
  • Actual Bandwidth: The actual amount of data transmitted by the data channel.

Channel Bandwidth Limitations

The bandwidth limitation of the data transmission channel refers to the maximum amount of data (in bytes per second) that can be transmitted by the channel within a unit of time.

Due to the physical characteristics of the interface components and the actual operating environment, both the command signal transmission channel and the data transmission channel have static and dynamic bandwidth limitations.

Static Bandwidth Limitation

Static bandwidth limitation refers to the fixed bandwidth of the command signal transmission channel, which cannot be changed due to the physical and inherent electrical properties of the materials. For detailed parameters regarding static bandwidth limitations of the data transmission channels, please refer to the table below.

Channel TypeTransmission DirectionStatic Bandwidth
Command Signal Transmission ChannelMobile App -> Payload Device
Payload Device -> Mobile App
Autel Sky Platform -> Payload Device
Payload Device -> Autel Sky Platform
2048 B/s
Data Transmission ChannelPayload Device -> Mobile App8192Kbps

Dynamic Bandwidth Limitation

Dynamic bandwidth limitation refers to the fact that the maximum data transfer capacity of a data transmission channel changes dynamically due to factors like link status and electromagnetic environment. Therefore, the actual bandwidth of the data transmission channel should be lower than the real-time bandwidth.

Flow Control

The PSDK data transmission module implements flow control by using traffic thresholds and buffers, limiting the amount of data sent from the payload device to the mobile app or airborne computer. The flow control process in PSDK is as follows:

  1. The payload device transmits data to the airborne computer or mobile app via the data channel.
  2. When the amount of data sent by the payload device exceeds the traffic control threshold, the excess data will be temporarily stored in the buffer.
  3. When the buffer is full, any data exceeding the traffic threshold will be discarded.
  4. When the data channel is free, the flow control module will send the data stored in the buffer.

image

Note:

  • The flow control cycle of the data transmission module is 1 second. In each control cycle, the amount of data transmitted by the payload device should be less than the user-defined traffic threshold.
  • The traffic threshold determines the maximum amount of data that can be transmitted through the current data transmission channel. This threshold is determined by factors such as static bandwidth limitations, dynamic bandwidth limitations, and the bandwidth occupation ratio of the data transmission channel.

3. Using the Data Transmission Function

To use the data transmission function in PSDK, you need to initialize the data transmission module after creating the project file and completing the PSDK initialization. Then, you can implement the data transmission function and monitor the status of the data channels.

Initializing the Data Transmission Module

Before using the data transmission function, you need to initialize the data transmission module with the following code to ensure the payload device can transmit data properly.

if(0 != UAV_LowSpeedDataChannel_Init()) {
printf("UAV_LowSpeedDataChannel_Init failed\n");
return -1;
}

Implementing Data Sending Functionality

The payload device developed with PSDK sends test data to the mobile app or onboard computer via the command signal transmission channel and the data transmission channel.

  • Sending Control Commands to the Mobile App The payload device developed with PSDK sends control commands to the mobile app through the command signal transmission channel.
if(0 != UAV_LowSpeedDataChannel_SendData(UAV_CHANNEL_ADDRESS_MASTER_RC_APP, data_type, data, len)) {
printf("UAV_LowSpeedDataChannel_SendData failed\n");
return -1;
}

Note:

  • data_type refers to the data type, which can also represent the business type; data refers to the data content; len refers to the data length. The mobile app receives the control commands sent by the payload device via the command signal transmission channel.
  • Sending Data to the Autel Sky Platform The payload device developed with PSDK sends commands to the Autel Sky platform through the command signal transmission channel.
if(0 != UAV_LowSpeedDataChannel_SendData(UAV_CHANNEL_ADDRESS_CLOUD_API, data_type, data, len)) {
printf("UAV_LowSpeedDataChannel_SendData failed\n");
return -1;
}
  • Sending Bulk Data to the Mobile App The payload device developed with PSDK sends data to the mobile app through the data transmission channel.
if(0 != UAV_HighSpeedDataChannel_SendDataStreamData(data_type, data, len)) {
printf("UAV_HighSpeedDataChannel_SendDataStreamData failed\n");
return -1;
}

Implementing Data Reception Functionality

After constructing and registering the data reception function, the payload device developed with PSDK can receive control commands sent from the mobile device and the Autel Sky Platform via the command signal transmission channel.

Construct Callback Function

static void UAV_LowSpeedDataChannel_RecvDataCallback(E_UAVChannelID channel, uint8_t data_type, uint8_t *data, uint32_t len)
{
if(UAV_CHANNEL_ADDRESS_MASTER_RC_APP == channel) {
switch(data_type) {
case UAV_DATA_TYPE_CONTROL_CMD:
// Processing Control Commands
break;
default:
break;
}
} else if(UAV_CHANNEL_ADDRESS_CLOUD_API == channel) {
switch(data_type) {
case UAV_DATA_TYPE_COMMAND:
// Processing Commands
break;
default:
break;
}
}
}

Register Callback Function

if(0 != UAV_LowSpeedDataChannel_RegRecvDataCallback(UAV_CHANNEL_ADDRESS_MASTER_RC_APP, UAV_LowSpeedDataChannel_RecvDataCallback)) {
printf("UAVLowSpeedDataChannel_RegisterRecvDataCallback failed\n");
return -1;
}
if(0 != UAV_LowSpeedDataChannel_RegRecvDataCallback(UAV_CHANNEL_ADDRESS_CLOUD_API, UAV_LowSpeedDataChannel_RecvDataCallback)) {
printf("UAVLowSpeedDataChannel_RegisterRecvDataCallback failed\n");
return -1;
}
// You can also register all at once
if(0 != UAV_LowSpeedDataChannel_RegRecvDataCallback(UAV_CHANNEL_ADDRESS_EVERY, UAV_LowSpeedDataChannel_RecvDataCallback)) {
printf("UAVLowSpeedDataChannel_RegisterRecvDataCallback failed\n");
return -1;
}