DJI API to MavLink conversion

How it works #

Data reception:

  • Entire will receive GPS position data, ATTITUDE data, TIME and other data via DJI API streams
  • Additionally ATTITUDE can be enhanced by actual gimbal angles read from Gremsy COM port

Data generation:

  • Based on received data, Entire will generate MavLink packets with appropriate information through MavLink Passthrough port.
  • Output MavLink baudrate is configurable
  • Output MavLink version (v1 or v2) is configurable
Supported MavLink packets: #

Packets generated by the Entire based on DJI API input:

  • HEARTBEAT (1Hz)
  • GPS_RAW_INT (10Hz)
  • GLOBAL_POSITION_INT (10Hz)
  • ATTITUDE (10Hz)
  • SYSTEM_TIME (1Hz)
  • COMMAND_LONG:
    • MAV_CMD_DO_DIGICAM_CONTROL
    • MAV_CMD_IMAGE_START_CAPTURE

Basic MavLink output parameters:

  • Source System: 1
  • Target System: 1
  • Generating device: AUTOPILOT1

 

Settings of DJI API via DJI Assistant #
  • Connect the drone via USB to DJI Assistant
  • Select A3 / N3 unit
  • In the MENU select “SDK”
  • Configure Baud rate 230400 (default)
  • Timestamp 1Hz
  • Attitude Quaternions 100Hz
  • Position 100Hz
  • GPS 1Hz
  • Gimbal Data 100Hz
  • Flight Status 1Hz
  • All other fields set as “Do Not Send”
  • Click to Enable API if not enabled

notice: This step is critical, majority of issues is caused by wrong settings of API.

Configure ports in the Entire #
  • Select any UNI port and set it to DJI mode
  • Select any other UNI port and set its mode to MavLink PassThrough
  • Configure MavLink baudrate in the Entire’s MENU
  • Navigate to MENU -> Miscelanneous -> MavLink OUT baudrate
  • Set value to match camera settings / manual
Optional settings #
  • Entire generates MavLink v2 by default, but you can switch to MavLink v1 by enabling “Convert data to MavLink v1”
  • When Entire detect trigger event (does not matter how trigger is generated): via PWM / via SBUS / via AIR Commander Link / via Entire’s internal trigger “by Time” or “by “Flown distance”, Entire can inject (generate) MavLink command for trigger photo by the camera. There are two options for MavLink trigger execution:
    • DO_DIGICAM_CONTROL command packet
    • START_CAPTURE command packet (set to single trigger)
How it works

Data reception:

  • Entire will receive GPS position data, ATTITUDE data, TIME and other data via DJI API streams
  • Additionally ATTITUDE can be enhanced by actual gimbal angles read from Gremsy COM port

Data generation:

  • Based on received data, Entire will generate MavLink packets with appropriate information through MavLink Passthrough port.
  • Output MavLink baudrate is configurable
  • Output MavLink version (v1 or v2) is configurable
Supported MavLink packets:

Packets generated by the Entire based on DJI API input:

  • HEARTBEAT (1Hz)
  • GPS_RAW_INT (10Hz)
  • GLOBAL_POSITION_INT (10Hz)
  • ATTITUDE (10Hz)
  • SYSTEM_TIME (1Hz)
  • COMMAND_LONG:
    • MAV_CMD_DO_DIGICAM_CONTROL
    • MAV_CMD_IMAGE_START_CAPTURE

Basic MavLink output parameters:

  • Source System: 1
  • Target System: 1
  • Generating device: AUTOPILOT1

 

Settings of DJI API via DJI Assistant
  • Connect the drone via USB to DJI Assistant
  • Select A3 / N3 unit
  • In the MENU select “SDK”
  • Configure Baud rate 230400 (default)
  • Timestamp 1Hz
  • Attitude Quaternions 100Hz
  • Position 100Hz
  • GPS 1Hz
  • Gimbal Data 100Hz
  • Flight Status 1Hz
  • All other fields set as “Do Not Send”
  • Click to Enable API if not enabled

notice: This step is critical, majority of issues is caused by wrong settings of API.

Configure ports in the Entire
  • Select any UNI port and set it to DJI mode
  • Select any other UNI port and set its mode to MavLink PassThrough
  • Configure MavLink baudrate in the Entire’s MENU
  • Navigate to MENU -> Miscelanneous -> MavLink OUT baudrate
  • Set value to match camera settings / manual
Optional settings
  • Entire generates MavLink v2 by default, but you can switch to MavLink v1 by enabling “Convert data to MavLink v1”
  • When Entire detect trigger event (does not matter how trigger is generated): via PWM / via SBUS / via AIR Commander Link / via Entire’s internal trigger “by Time” or “by “Flown distance”, Entire can inject (generate) MavLink command for trigger photo by the camera. There are two options for MavLink trigger execution:
    • DO_DIGICAM_CONTROL command packet
    • START_CAPTURE command packet (set to single trigger)